OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Cooba on 28 Jan 2004, 00:17:32

Title: delete body
Post by: Cooba on 28 Jan 2004, 00:17:32
How can we make KIA players bodies to dissapear...after fullfiling certain condition ??

I need this to my TDM mission.
Thanx for Help :)
Title: Re:delete body
Post by: CptBravo on 28 Jan 2004, 01:20:43
Here is a script by someone who sadly I can not remember who!

So whomever he is, he gets the credit!

; Select the Unit
_unit = _this select 0
;-Delay the delete after death
~30

;  delete the unit
deletevehicle _unit
exit


and in the init field of the unit you want deleted after it gets killed place :

this addeventhandler ["killed", {_this exec "erase.sqs"}];

Title: Re:delete body
Post by: Cooba on 28 Jan 2004, 03:00:10
Ok, its working. Thanx Cpt.Bravo

Only thing i changed is delay the delete after death.
I need some condition, not time. I did it simple:

_unit = _this select 0
goto "loop"

#loop
~15
? (mycondition) : goto "next"
goto "loop"

#next
deletevehicle _unit
exit

I know its very simple but work good  ;)

Sorry for (maybe) incorrect English  ::)