09.02.2014, 18:02
Quote:
Im just letting know that random object disappearing issue was in my script, I had random house fires, and I was reseting fire objects ( destroying ) them before creating new fire, but as I already destroyed them when firefighters cleared out the fire, variables with assigned IDs still had dynamic object IDs, so I was destroying other objects which had the same ids as fire object IDs, I hope it made a sense.
Video, just for a reference: http://www.youtube.com/watch?v=AJI-Rpp4QwI Anyhow, sleep well by knowing that there isn't an issue in the plugin ![]() PS. It took me only 3 years to find this out, that I have a bug in the script ![]() |
You should reset the variable when you are deleting an object ID:
pawn Код:
new Obj = -1;
// Somewhere
Obj = CreateDynamicObject( ... );
// Somewhere else
if( Obj != -1 )
{
DestroyDynamicObject( Obj );
Obj = -1;
}