# playMaker

### Author Topic: Compare multiple ints less than/equal/greater than  (Read 377 times)

#### IsolatedPurity

• Playmaker Newbie
• Posts: 17
##### Compare multiple ints less than/equal/greater than
« on: December 23, 2019, 12: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.

#### krmko

• Beta Group
• Hero Member
• Posts: 1055
##### Re: Compare multiple ints less than/equal/greater than
« Reply #1 on: December 23, 2019, 02:50:49 PM »
Well, you could probably do it without arrays in code. I'm curious, why wouldn't you use an array?

• Full Member
• Posts: 200
##### Re: Compare multiple ints less than/equal/greater than
« Reply #2 on: December 23, 2019, 08:46:28 PM »
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.