Home   Help Search Login Register  

Author Topic: deleting vehicles and death bodies script  (Read 1332 times)

0 Members and 2 Guests are viewing this topic.

terrazasjs

  • Guest
deleting vehicles and death bodies script
« on: 09 Jun 2003, 01:23:27 »
i have this  mission that I making and I want to use a script to delete death bodies and vehicles but the script that I download from the script section doesn't work at all.
one goes like this:
                            clearcorpse.sqs

#loop
_eunit = list EVERYUNIT
"?(!alive _x):[_x] exec {delbody.sqs} foreach _eunit
goto "loop"
exit

and the next is:
                    delbody.sqs

_u = _this select 0
~60
_u setpos [0,0,99999]
deletevehicle _u
exit

in the map i have to create a triger as big as the whole mission X=99999 and y=99999 and name it "EVERYUNIT"

then in the init field of every soldier or vehicle I have to write this code:"[] exec {clearcorpse.sqs}"or I can put this code too in the init sqs file and i think in this way it will affect every unit in the map,and i alraedy did all of this.

but the code doesn't work nither in the init field or in the init sqs file or i'm doing something wrong  :-\

if you can make this script to work can you show me the changes you make and attach me a little sample mission?

and once againg thank you for your time  :)

deaddog

  • Guest
Re:deleting vehicles and death bodies script
« Reply #1 on: 10 Jun 2003, 06:08:50 »
Try changing the delay from 60 seconds to about 2, just to see if the bodies start disappearing.

I've noticed that if more than about 30-40 seconds go by after a units death, the body cannot be deleted.

By the way, this line:

_u setpos [0,0,99999]

is totally unnecessary.

SteroidG

  • Guest
Re:deleting vehicles and death bodies script
« Reply #2 on: 10 Jun 2003, 07:20:53 »
Hmm, that reminds me, I've made a script that revive NPC units after a certain amount of time, and if it's more than 25 or 35 seconds, it will simply set their dammage to 0 but not re-animate them. So they just lying there fully healed but do nothing.

Also, if you wanna do reviving in MP, make sure you tell every machine (broadcast publicVariable) that they are revived, else, all the client machines will be seeing corpses floating around the ground and shooting!