Home   Help Search Login Register  

Author Topic: All in?  (Read 959 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
All in?
« on: 06 Aug 2006, 23:06:02 »
How can i check wether every single west soldier on a map is in the back seat of a Blackhawk named chop1

Note - All west soldiers are in more then just one group.
Cheers.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: All in?
« Reply #1 on: 07 Aug 2006, 01:25:37 »
first thing, you need to create a list of all west units

2 methods

1) Place a repeating, activated by anybody trigger encompassing the entire map
and from this trigger retuirn a list of all west units
See following thread <<   http://www.ofpec.com/forum/index.php?topic=27814.0  >>

or

2) if there are only a few units, create an array of all the west units

eg
_Warray = [W1,W2,W3,W4]


and then use following condition


{if ((count _x in _veh) ==(count _x))then{do whatewver you want here}}foreach _wunits


code untested should work
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline nindall

  • Members
  • *
Re: All in?
« Reply #2 on: 07 Aug 2006, 20:29:58 »
I would use group names rather than an array of unit names because if a unit dies after you've created the unit array they cannot satisfy the condition.

Code: [Select]
"_x in chop1" count (UNITS group1 + UNITS group2) == count (UNITS group1 + UNITS group2)
If you've got loads of groups i'd use a trigger -

Activation -West/Present
Condition - "_x in chop1" count thislist == count thislist

EDIT - Would the chopper be counted as a seperate unit in the in the trigger?
« Last Edit: 07 Aug 2006, 20:33:27 by nindall »

Offline 456820

  • Contributing Member
  • **
Re: All in?
« Reply #3 on: 08 Aug 2006, 14:03:49 »
Thanks alot gonna test.