OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 24Gamer on 14 Jun 2004, 20:12:48
-
I have a trigger thatis the size of the map area, and when it is activated i have
Hint Format ["%1", thislist select 1]
as the On activation code, yet i get an error. im trying to make a script to clear the bodies once the trigger is activated yet it im having problems with the array :-/ (count = 0) anyone know why?
-
what's the activation side of the trigger? A trigger takes in it's 'list' only the units which are of the same side as the side that's set in the trigger options.
-
the map is capture the flag and the activation is (East Not present) this and EFlagTaken
-
or even better would be if you could guide me on how to make a script to clear all the bodies when it is run (with a trigger etc.)
-
I have a feeling there is a delete dead bodies script/tutorial in the Ed Depot.
-
yeah i found one but it deletes the unit after it dies, i want to make a script that deletes all the units when a trigger is activated
-
Put this in the onactivation of your trigger :
"deletevehicle _x" foreach thislist
-
wouldn't that delete everything? even things that aren't dead :P
-
yes, it depends what's in the condition of you trigger.
-
LOL 24 your here too:P
Well i dont know shit yet but has this info all have to be put in description.ext
if thats the case editting is fucking funny :D
-
LOL 24 your here too:P
Well i dont know sh*t yet but has this info all have to be put in description.ext
if thats the case editting is f**king funny :D
erm, lol :P
-
blitz, not everything goes into the description.ext...
o and for the deletebody thing, you could also make a script:
_body= this select 0
#loop
(not alive) body: deletevehicle body
~20
correct me if im wrong
-
_body = _this select 0
#loop
?!alive _body: deletevehicle _body; exit
~20
goto "loop"
:)
-
what calls the script?
-
[name-of-the-unit-that-has-to-disappear-when-it's-dead] exec "whateveryouwant.sqs"
-
yeah, still that aint what im trying to achieve but thanks for the help
-
ok, try this, untested
execute it with [thislist] exec "deletebodies.sqs" in the on activation of your trigger ACTIVATED,ONCE by the side you want.
;deletebodies.sqs
; only men will be deleted!
_list = _this select 0
_i = 0
#loop
_body = _list select _i
?"man" countype [_body] > 0 && !alive _body : deletevehicle _body
_i = _i + 1
?_i < count _list : goto "loop"
exit