Jump to content
Sign in to follow this  
meade95

How to write script with multiple conditons.

Recommended Posts

In a trigger - If one wants to have mulitple possible conditions (each NOT dependent on the other for activation of said trigger)...how is it written?

Meaning you wouldn't use the "AND" function.... Is there an "OR" functiion?

Say the trigger would activate if X, Y or Z unit is within 5 meters? How would I write this?

Thanks

Share this post


Link to post
Share on other sites
In a trigger - If one wants to have mulitple possible conditions (each NOT dependent on the other for activation of said trigger)...how is it written?

Meaning you wouldn't use the "AND" function.... Is there an "OR" functiion?

Say the trigger would activate if X, Y or Z unit is within 5 meters? How would I write this?

Thanks

Yes there is an or which is identical to ||.

http://community.bistudio.com/wiki/or

http://community.bistudio.com/wiki/Operators

http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2

Look at the distance command too.

Edited by callihn

Share this post


Link to post
Share on other sites

OR or ||, both work.

unitX distance theTarget < 5 || unitY distance theTarget < 5 || unitZ distance theTarget < 5

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  

×