Home   Help Search Login Register  

Author Topic: check all of group in trigger...  (Read 1102 times)

0 Members and 1 Guest are viewing this topic.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
check all of group in trigger...
« on: 22 Apr 2005, 08:18:57 »
scenario - i have a patrol group of about 12 loons. once they're dealt with i want some text to appear. i could do this with a script no problem, but i was wondering if there's a one-line piece of code which i could put in the condition field of a trigger to check the whole group, without having to resort to a separate script.

foreach doesn't seem to work, that or i'm getting the brackets wrong.

any ideas?

Offline Blanco

  • Former Staff
  • ****
Re:check all of group in trigger...
« Reply #1 on: 22 Apr 2005, 08:27:03 »
Why don't you use a simple "east/west... not present" trigger?

Or name the group (eg : egrp = group this)
and in the condition of the trigger :
Code: [Select]
"alive _x" count units egrp == 0
 
« Last Edit: 22 Apr 2005, 08:27:22 by Blanco »
Search or search or search before you ask.

Offline 456820

  • Contributing Member
  • **
Re:check all of group in trigger...
« Reply #2 on: 22 Apr 2005, 08:29:50 »
i thought you dont use " " i use { } around alive _x instead
like this
{alive _x} count units egrp == 0

Offline Blanco

  • Former Staff
  • ****
Re:check all of group in trigger...
« Reply #3 on: 22 Apr 2005, 08:39:23 »
Both will work.
Search or search or search before you ask.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:check all of group in trigger...
« Reply #4 on: 22 Apr 2005, 17:09:20 »
that's what i was after - i could have done the trigger thing, but the patrol moves, so i'd need either a huge trigger, or one that moved with the group - but the

Code: [Select]
{alive _x} count units grp_name == 0
seems the very thing - cheers indeed. :)
« Last Edit: 22 Apr 2005, 17:09:48 by bedges »