Jump to content
Sign in to follow this  
Nuttex

Condition of trigger/waypoint

Recommended Posts

Hello, can't seem to fix this on my own. Basically, I need a condition on trigger/waypoint that actives only if unit1, unit2, ..., unit8 either way don't exist (as in, their AI has not been turned on in lobby), are not alive (not sure it bears any difference from non-existence in A2) or are not in vehicle called ural. I've been trying to use this:

((unit1 in ural) or (!alive unit1)) AND ((unit2 in ural) or (!alive unit2)) AND ((unit3 in ural) or (!alive unit3)) AND ((unit4 in ural) or (!alive unit4)) AND ((unit5 in ural) or (!alive unit5)) AND ((unit6 in ural) or (!alive unit6)) AND ((unit7 in ural) or (!alive unit7)) AND ((unit8 in ural) or (!alive unit8))

Spent some time on this and haven't gotten any results so far. Am I missing something here?

Share this post


Link to post
Share on other sites

I think you might also need a check for non-existence.

To test if the units don't exist... use isNull

Share this post


Link to post
Share on other sites

{!(alive _x) || !(_x in (crew ural))} count [unit1,unit2,unit3,unit4,unit5,unit6,unit7,unit8] == count playableUnits

Couldn't really test that fully - hope it works!

Share this post


Link to post
Share on other sites

Pelham, I've changed it a bit, because it wouldn't work.

{(_x in (crew ural))} count [unit1,unit2,unit3,unit4,unit5,unit6,unit7,unit8] == {(alive _x)} count [unit1,unit2,unit3,unit4,unit5,unit6,unit7,unit8]

Thanks for help, mate!

Edited by nuttex

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  

×