Home   Help Search Login Register  

Author Topic: condition when all units in a trigger die  (Read 920 times)

0 Members and 1 Guest are viewing this topic.

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
condition when all units in a trigger die
« on: 01 Oct 2007, 14:55:37 »
i set a trigger collecting units in a variable,  but now i need a condition for when all those units are dead

i've tried {not alive _x) foreach variable

but i dont think that works in conditions

i need this cos i also have to exclude certain units from the list, otherwise i'd just use a not present trigger
« Last Edit: 01 Oct 2007, 15:06:33 by Surdus Priest »
Campaigns are hard, I'll stick with scripting for now!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: condition when all units in a trigger die
« Reply #1 on: 01 Oct 2007, 15:11:11 »
I assume your variable is an array with all the units present at time "T" in a trigger's area.

Code: [Select]
? {alive _x} count variable == 0: hint "all are dead"

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
Re: condition when all units in a trigger die
« Reply #2 on: 01 Oct 2007, 15:21:42 »
star :D
Campaigns are hard, I'll stick with scripting for now!