How do I set up an if statement to check if a variable is the highest out of four separate variables.
I assume I can say:
(if: $variable1 > $variable2 and $variable3 and $variable4)[run script A]
(if: $variable2 > $variable1 and $variable3 and $variable4)[run script B]
(if: $variable3 > $variable2 and $variable1 and $variable4)[run script C]
(if: $variable4 > $variable2 and $variable3 and $variable1)[run script D]
But what if there is a joint highest - how can I give an order of priority so that only one script runs no matter what.
For example, I want script a to take priority over scripts B, C, and D - so if A and C are tied, it is script A that gets run
I assume I can say:
(if: $variable1 > $variable2 and $variable3 and $variable4)[run script A]
(if: $variable2 > $variable1 and $variable3 and $variable4)[run script B]
(if: $variable3 > $variable2 and $variable1 and $variable4)[run script C]
(if: $variable4 > $variable2 and $variable3 and $variable1)[run script D]
But what if there is a joint highest - how can I give an order of priority so that only one script runs no matter what.
For example, I want script a to take priority over scripts B, C, and D - so if A and C are tied, it is script A that gets run