0 Members and 1 Guest are viewing this topic.
In your init.sqs file create a global variable called soldiers:soldiers=[]Now, in your createunit script, add this after you create an entire group:soldiers=soldiers + units _groupNow, create a new script called deletebodies.sqs (or whatever):Code: [Select];deletebodies.sqs#loop~20?count soldiers == 0:goto "loop"_temp=[]_i=0#l1_u=soldiers select _i?!alive _u:_temp=_temp+[_u];deletevehicle _u_i=_i+1?_i<count soldiers:goto "l1" soldiers=soldiers-_tempgoto "loop"execute this script from your init.sqs file:[] exec "deletebodies.sqs"I haven't tested this so there is no guarantee, but give it shot. EditMade a small change
;deletebodies.sqs#loop~20?count soldiers == 0:goto "loop"_temp=[]_i=0#l1_u=soldiers select _i?!alive _u:_temp=_temp+[_u];deletevehicle _u_i=_i+1?_i<count soldiers:goto "l1" soldiers=soldiers-_tempgoto "loop"
Whole thread is here: http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0