Home   Help Search Login Register  

Author Topic: how do you trigger when several groups die?  (Read 551 times)

0 Members and 1 Guest are viewing this topic.

Pixie

  • Guest
how do you trigger when several groups die?
« on: 24 Nov 2004, 10:45:32 »
Sorry if this is a dumb question but im a noob to this.

I have tried to assign groups names with "NAME=group this"

and then in the trigger !(alive NAME)and !(alive NAME2) etc.

what am i doing wrong ???

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:how do you trigger when several groups die?
« Reply #1 on: 24 Nov 2004, 11:02:21 »
Sorry, but you should know by your self, as the game tells it to you...

alive command works only with units NOT WITH GROUPS, so you name it correct but make this kind of condition: Count units NAME1 == 0 It returns true, when everybody in the group are killed... (men=0)

Pixie

  • Guest
Re:how do you trigger when several groups die?
« Reply #2 on: 24 Nov 2004, 11:04:29 »
Thanks ill give it a try

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:how do you trigger when several groups die?
« Reply #3 on: 24 Nov 2004, 20:20:05 »
Note that it takes the game some time to figure out that the count is 0.... So be patient ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:how do you trigger when several groups die?
« Reply #4 on: 25 Nov 2004, 01:38:26 »
"alive _x" count units grp1 == 0

is quicker.   Syntax not guaranteed.  A simple count units command can take several minutes.
Plenty of reviewed ArmA missions for you to play

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:how do you trigger when several groups die?
« Reply #5 on: 25 Nov 2004, 09:03:39 »
But shouldn't there be forEach somewhere (Great idea, I've had problems with that count thing :) )

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:how do you trigger when several groups die?
« Reply #6 on: 25 Nov 2004, 10:39:30 »
No.   Although I understand why you ask.

Count and forEach use similar syntax for different purposes.    forEach is used when you want a command to be carried out by each unit in the array.     Count is used when you want to count the number of units in the array that fulfil the condition.     Doing a command, and fulfulling a condition are obviously two entirely different things which is why there are two commands, forEach and count.

Count can also be used just to count the members of an array, without the _x bit.
Plenty of reviewed ArmA missions for you to play

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:how do you trigger when several groups die?
« Reply #7 on: 25 Nov 2004, 12:21:06 »
Great! Thanks! That will be a good help in my coming missions! :D