Download

Comparing three integers?

For a system to work properly, I need to compare three numbers and find the highest. How does one do this without an endless string of loops and branches?

Feed the numbers into an array, do one loop through the array, and match it against an initial (null/0/-999999999999999) value. If the number is bigger than the initial value, redefine the variable as the new number, and match any remaining numbers in the array against that new value. You will be left with the biggest number.

If you want to go further, collapse these nodes into a function, which you can re-use in other parts of the blueprint.

Array min/max has been in the engine for while now: