I'm trying to write a script that runs on a trigger every few minutes that checks for any dead units, and just deletes them to help keep framerates and server processing low on my very large map...
This is what I've written...
~2
_all = [man1,man2,man3,man4,man5,man6,man7]
#loop
{if (!alive _x) then {deletevehicle _x}} foreach _all;
~1
exit
If I remove the "!" before the alive, then I can watch the units (alive of course), disappear right before my eyes... but if I put in the "!" as shown above, and shoot the men - they never disappear. Am I missing something like the need for a hidebody or something first?
Any help appreciated.