OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: shark attack on 11 Oct 2003, 16:50:53
-
hi im trying to get hozs delete dead body script to work with mission im making but am having difficulties
the script
; Select the Unit
_unit = _this select 0
;-Delay the delete after death
~5
; Sink into the ground
_k = (getpos _unit) select 2
#loop
_k = _k - 0.1
_unit setpos [(getpos _unit) select 0,(getpos _unit) select, _k]
?(_k > -1):goto "loop"
; finally delete the vehicle
deletevehicle _unit
exit
the script works everytime but i get error messages eg
invalid no in expression which i took to be the commer
(getpos _unit)select,_k
so i removed only to recieve different error message
error zero division
its a cool script and would like to use it anyone see what im doing wrong
i have the line this addeventhandler ["killed", {_this exec "dead.sqs"}] in the init field of units i want to disapear
any help will be apreciated
shark attack!
-
fixed it
altered script so that unit dosnt sink just disapears
itll do for me
put this in units init that you wish to delete afterdeath
this addeventhandler ["killed", {_this exec "dead.sqs"}]
dead.sqs
; Select the Unit
_unit = _this select 0
;-Delay the delete after death
~10
; finally delete the vehicle
deletevehicle _unit
exit