Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: IsolatedPurity on December 23, 2019, 02:01:48 PM
-
Is there a way to compare multiple ints and choose the lowest one without using an array? Kind of the like the Int Compare action but with more than two.
-
Well, you could probably do it without arrays in code. I'm curious, why wouldn't you use an array?
-
Well, the easiest way to do it is to just stack em up.
Eg;
* Int compare = 5
- equal = event 1
- greater = event 1
- less = ...
* Int compare = 0
- equal = event 2
- greater = event 2
- less = ...
And so on
With the above example; Event 1 is int 5 or more. Event 2 is 0 to 4. This will only work when the int compares are sequenced correctly. If the second int compare went first, it would send the event for everything, but by going last, all the higher options have happened (or not) before reaching it, so only 0 to 4 remains to be checked.