Home   Help Search Login Register  

Author Topic: Alive Check  (Read 422 times)

0 Members and 1 Guest are viewing this topic.

polvy

  • Guest
Alive Check
« 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

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Alive Check
« Reply #1 on: 10 Jan 2005, 23:25:13 »
"alive _x" count listoftargetunits == 0

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Alive Check
« Reply #2 on: 10 Jan 2005, 23:25:19 »
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.

polvy

  • Guest
Re:Alive Check
« Reply #3 on: 11 Jan 2005, 00:02:07 »
Thank you so much fellas, it worked beautifully.  :)

~Polvy