Jump to content
rick rawlings

Syntax Question About Waiting For All Groups

Recommended Posts

So I have a mission with three player controlled groups. I want the chopper to wait until all members of all groups are on board before moving out. With one group, I would put a trigger with this in the condition:

({alive _x;} count units grp1) == ({_x in heli1;} count units grp1)

for the three groups would it just be:

({alive _x;} count units grp1) == ({_x in heli1;} count units grp1) && ({alive _x;} count units grp2) == ({_x in heli1;} count units grp2)&& ({alive _x;} count units grp3) == ({_x in heli1;} count units grp3)

or is there a forEach units [grp1, grp2, grp3] thing I need to do?

 

Thanks for the help!

 

Rick R

Share this post


Link to post
Share on other sites
{ {alive _x}count units _x == ({alive _x && {_x in heli1}}count units _x) }count [grp1,grp2,grp3] isEqualTo 3

Wrap it all in another count and make sure the unit in the heli1 is alive as well, just in case :D

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×