vindaboner 10 Posted October 6, 2014 Hi guys, I've searched around a tried a few ideas with no joy. I was wondering how do I simply make the following script loop every 3 minutes? Many thanks! While {true} do { Sleep 180; { _dropunits = _x; if ((side _dropunits) == east) then { if ( ({(_dropunits distance _x) > 2000} count playableUnits) == ({isplayer _x} count playableUnits) ) then { deletevehicle _dropunits; }; }; } forEach _dropunits; Sleep 10; Share this post Link to post Share on other sites
opusfmspol 282 Posted October 7, 2014 (edited) Are you seeking to remove AI that have strayed too far from the player group? The script is really confusing because you reference _dropunits as the array as well as the single element of the array selected as _x. As for the loop, the sleep 180 will work if you have a close }; for the while-do, and the script works. But I suspect it will error out. This is what I'm seeing: While {true} do { Sleep 180; { _dropunits = _x; if ((side _dropunits) == east) then { if (({(_dropunits distance _x) > 2000} count playableUnits) == ({isplayer _x} count playableUnits)) then { deletevehicle _dropunits; }; }; } forEach _dropunits; Sleep 10; Edited October 7, 2014 by OpusFmSPol Share this post Link to post Share on other sites