Jump to content
Sign in to follow this  
rory_pamphilon

simple Area cleanup sctipt - how to?

Recommended Posts

Hi,

Looking to implement some form of v simple cleanup script that removes dead buzzards from 3 dif airfields on Altis. These airfields are manned by AI only so can't have anything that uses proximity to player as a trigger to cleanup.

Ideally a big square marker that removes dead ai buzzards after 2mins.

Many thanks

Share this post


Link to post
Share on other sites
while {true} do {
   {deleteVehicle _x;} forEach allDead; 
    sleep 60 * 2;
};

Share this post


Link to post
Share on other sites

Sorry maybe im not making it clear how little I know lol..

Does that code cover the whole map, I.e irrelevant of wreck distance? If so how do I get the server to run it?

If it only applies to a certain area/marker how do I get it to run in that area?

Thanks

Share this post


Link to post
Share on other sites

while {true} do {
   {deleteVehicle _x;} forEach allDead; 
    sleep 60 * 2;
};  

This will run on the entire map. To get it to run on the server create a file called "cleanUp.sqf"; that contains the code. Inside the initServer.sqf put this line inside it.

_cleanUp = execVM "cleanUp.sqf";

This will make only the server run this code

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×