Jump to content
Sign in to follow this  
Jigsor

Multiple AND and Ors in trigger conditions.

Recommended Posts

I can't seem to set this trigger off.

Two PublicVariabled values of task1 == 1 and timesup == 0 must be true

In addition, 1 of 6 objects must be alive.

In a script I've assigned Var-names and PublicVariabled each object Var-name like this.

example:

_VarNamet1="tsk1tower1";
_lighttower1 SetVehicleVarName _VarNamet1;
_lighttower1 Call Compile Format ["%1=_This ; PublicVariable ""%1""",_VarNamet1];

So in editor placed trigger condition I have:

aachenon == 1 AND timesup == 0 AND alive tsk1tower1 || alive tsk1tower2 || alive tsk1tower3 || alive tsk1tower4 || alive tsk1tower5 || alive tsk1tower6; 

I'm not getting errors so it seems trigger is not going off.

Is this condition statement proper? If not, what is a better way?

Share this post


Link to post
Share on other sites

your condition should be:

(aachenon == 1) && (timesup == 0) && ((alive tsk1tower1) || (alive tsk1tower2) || (alive tsk1tower3) || (alive tsk1tower4) || (alive tsk1tower5) || (alive tsk1tower6));

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  

×