Home   Help Search Login Register  

Author Topic: Checking if entire group has been killed??  (Read 849 times)

0 Members and 1 Guest are viewing this topic.

StonedSoldier

  • Guest
Checking if entire group has been killed??
« on: 29 Oct 2002, 00:15:57 »
in my mission i got a western group "grp1" and i want a trigger to run when when all the units are dead.

is the script something like not alive grp1??

thankx for any help guys!!

------------------------------------------------------------
"You cant just eat the arms and throw away the peel, a mans not a piece of fruit"

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Checking if entire group has been killed??
« Reply #1 on: 29 Oct 2002, 22:04:57 »
Use the count command for this.  Put the following code in your trigger's condition field:

"alive _x" count units grp1 < 1

THis counts how many units in grp1 are alive, and if that number is less than 1 (i.e., 0--all are dead), then the trigger will be activated.
Ranger

StonedSoldier

  • Guest
Re:Checking if entire group has been killed??
« Reply #2 on: 29 Oct 2002, 23:34:18 »
Thankx very much

silent1

  • Guest
Re:Checking if entire group has been killed??
« Reply #3 on: 06 Nov 2002, 23:00:44 »
 Another thing you can do is: create a trigger, then group it to the leader of the group you'll be checking whether they're alive or not. Re-open the trigger, and where the 'None' box is, you should instead get 'vehicle'. Click on this box and select 'All group members', 'Not Present'. You'll get the exact same affect, without using code. Hope this helps!

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Checking if entire group has been killed??
« Reply #4 on: 07 Nov 2002, 00:22:44 »
Another alternative is the countside command. This command is life specific (ie. it doesn't count dead dudes).

So the condition:

West countside units group == 0

Can be used when you want a trigger to go off when all members of a group are dead ;)