Jump to content
Sign in to follow this  
thetrooper

Simple syntax issue

Recommended Posts

Hi all, I can't work out how the following combined would work.

Description: any of the four units in a trigger area, but 2 enemy units must be dead.

(ff1 in thislist || ff2 in thislist || ff3 in thislist || ff3 in thislist) && (!(alive enldr) && !(alive en1));

Doesn't look right. If helps to simplify. The four units are in a group called FFGrp.

Any help would be much appreciated

Share this post


Link to post
Share on other sites

Simplification :

({_x in thislist} count [ff1,ff2,ff3,ff4] >1) AND ({alive _x} count [enldr,en1] == 0)

Edited by ProfTournesol

Share this post


Link to post
Share on other sites
Hi all, I can't work out how the following combined would work.

Description: any of the four units in a trigger area, but 2 enemy units must be dead.

(ff1 in thislist || ff2 in thislist || ff3 in thislist || ff3 in thislist) && (!(alive enldr) && !(alive en1));

Doesn't look right. If helps to simplify. The four units are in a group called FFGrp.

Any help would be much appreciated

{group _x == FFGrp} count thislist > 0

Share this post


Link to post
Share on other sites

Yeah, i didn't see the group thingy. You can have too :

({_x in thislist} count units FFgrp >1) AND ({alive _x} count [enldr,en1] == 0)

Share this post


Link to post
Share on other sites
Yeah, i didn't see the group thingy. You can have too :

({_x in thislist} count units FFgrp >1) AND ({alive _x} count [enldr,en1] == 0)

yep should work fine, change to FFgrp >0 though (only need 1 from the group to trigger)

Share this post


Link to post
Share on other sites
yep should work fine, change to FFgrp >0 though (only need 1 from the group to trigger)

Indeed !

({_x in thislist} count units FFgrp >0) AND ({alive _x} count [enldr,en1] == 0) 

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  

×