Jump to content
Sign in to follow this  
thetrooper

Count a number of a group condition

Recommended Posts

I have a trigger but I only want it to activate it if there is say any 3 member of a group of 7 in it? Any ideas?

Share this post


Link to post
Share on other sites

Any number from 1 - total number of group units?

{_x in thislist} count units groupName >= 1

Share this post


Link to post
Share on other sites

{ {_x in thislist} count units _x >= 3 } count allGroups > 0

;)

Share this post


Link to post
Share on other sites

Is there any reason why this wouldn't work in a condition?

triggerActivated walk4 AND {_x in thislist} count units groupName == 3 

trigger not working :confused:

Share this post


Link to post
Share on other sites

Works for me?

Got the 2nd trigger set to activation: Anyone : Present

1st trigger named as walk4

edit: As bigshotking say below - group should be named with eg: grp1 = group this; in the group leaders init

code would then be:

triggerActivated walk4 AND {_x in thislist} count units grp1 == 3

Edited by PELHAM

Share this post


Link to post
Share on other sites

Did you set a group name for your group? It seems that you did not change the groupName that Pelham gave you

Share this post


Link to post
Share on other sites

I got 7 guys in my troop, but decided to count 6 in the end.

triggerActivated walk4 AND {_x in thislist} count units davisGrp == 6;

Still not working. :mad:

Maybe I should upload it somewhere so someone can have a look. Part of a campaign I'm building.

Share this post


Link to post
Share on other sites

I have done you a mission showing it working, what kind of Arma 2 do you have? Arma, OA, CO or RFT?

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
Sign in to follow this  

×