OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: polvy on 10 Jan 2005, 23:05:46
-
Would someone be able to provide and example of what text would be nessesary to end a mission once a list of named Soldiers were dead. I have a multiple assasination mission in mind. Thank you.
~Polvy
-
"alive _x" count listoftargetunits == 0
-
By text do you want it for a script or a trigger?
For a trigger try this in the condition field
({alive _x} count [unit1,unit2,....]) < 1
For a script try
if ({alive _x} count [unit1,unit2,unit3,...] < 1) then {end1 = true}
Syntax not tested.
There are other ways. You could give all your guys a "killed" event handler that runs a script whenever any of them get killed that checks how many are now dead.
-
Thank you so much fellas, it worked beautifully. :)
~Polvy