OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: roscoe on 16 Jan 2004, 16:32:00
-
is there a script to delete the dead in the standard op flash or do i have to buy resistance coz i cant find one such script or a copy of resistance anywhere :'(
-
I dunno man, but buy resitance, it's absolutley worth it.
:beat: *Gets Shot* :beat:
-
When was the deletevehicle command introduced?
I was reading the 1.3 unofficial command reference and couldn't see it in there.
-
Resistance is DEEPLY worth it, and pretty cheap these days. It's not just all the new commands and the campaign but it opens up a whole new world of addons and user created missions.
-
deleteVehicle was added in version 1.34 according to the official command reference.
Planck
-
Well then I don't see any reason why deleting dead people wouldn't work in 1.46. If the ready-made scripts have some fancy stuff you can always try to modify them or even write your own deletion script, it shouldn't be too hard.
-
Yeah, but body deletion is best done with eventhandlers.
-
no i cant do it still, i tried! :'( any ideas? or script snippets anyone can post? ???
-
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 _group
Now, create a new script called deletebodies.sqs (or whatever):
;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-_temp
goto "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. :)
Edit
Made a small change
Whole thread is here: http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0 (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0)
-
Whole thread is here: http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0 (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=15118;start=0)
;Dcheers mate i'l give it a shot! ;D