I have been trying to use the conversation between hoz and Adam to make this work and still cannot. As far as I can tell, the removeeventhandlers is my stumbling block, since I have 1.46 and I believe that is for 1.85. I have also been trying to make it 1 script, and everything works except the bodies don't go away! Following is what I am trying to do, a compilation of the above mentioned folks and some of mine:
?alive any in (list westbodies): exit
?!alive any in (list westbodies)
~5
?(!local Server): Exit
; Goodbye ALL deaded units
; Only problem I can see is that if a unit is created and killed between the 3
; second period, its corpse will be left behind... but how many units will be
; spawned and killed within 3 seconds? Shorten this delay to remedy this, but
; tie up more resources
_n=-1
#loop
_curlist = list westbodies
#loop2
_n = _n + 1
?(!alive (_curlist select _n)): [(_curlist select _n)] goto delbody
?(_n < (count _curlist)):goto "loop2"
_n=0
?(gamestatus != "FINISHED"): goto "loop"
hint "poo"
#delbody
_body = _this select 0
deletevehicle _body
exit
I see the hint "poo" come up, and don't get any errors, but the body remains, any ideas? If I try to send it to a delbodies.sqs it goes but the bodies don't disappear
Zombie