PetuniaEpoch Posted September 25, 2013 Report Share Posted September 25, 2013 Hey guys, We have an AI stronghold at Devils Castle, with some nice loot for those brave enough to take on the AI... Unfortunately since the new update, the ammo boxes (apparently randomly!) vanish... I'm 'pretty' sure it's relating to this cleanup script: if (_noPlayerNear) then { _nearObj = nearestObjects [_objectPos,["ReammoBox","WeaponHolder","WeaponHolderBase"],((sizeOf (typeOf _x)) + 5)]; { deleteVehicle _x; _deletedLoot = _deletedLoot + 1; } forEach _nearObj; _x setVariable ["looted",-0.1,true]; }; Does anyone think that's right? If it is, and if the code serves a function (I'm sure it does!), then would the best thing to do, be to assign the boxes I spawn at deviles with a variable, and then except them from the above if {} statement, in a similar way that Sarge AI and DZAI do? Thanks in advance for ya help! Mike. Link to comment Share on other sites More sharing options...
Torndeco Posted September 26, 2013 Report Share Posted September 26, 2013 if (vehicle _x getVariable ["Sarge",0] != 1) then { deleteVehicle _x; _deletedLoot = _deletedLoot + 1; }; Need to add variable to the crate i.e _crate1 setVariable ["Sarge",1,true]; To remove the variable so crate despawns later during server cleanup _crate1 setVariable ["Sarge",nil]; PetuniaEpoch 1 Link to comment Share on other sites More sharing options...
PetuniaEpoch Posted September 27, 2013 Author Report Share Posted September 27, 2013 Great, thanks :D if (vehicle _x getVariable ["Sarge",0] != 1) then { deleteVehicle _x; _deletedLoot = _deletedLoot + 1; }; Need to add variable to the crate i.e _crate1 setVariable ["Sarge",1,true]; To remove the variable so crate despawns later during server cleanup _crate1 setVariable ["Sarge",nil]; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now