Hi there. I really want to know how can i check if my integer falls in a specific range. I have my event output as integer and i need to know if it falls in range between 5-6. Is there is a specific node in blueprints for this?
Thank you in advance!
If you convert your integer to a float, there’s an InRange node you can use to see if it falls in your range.
-Chris
There’s a couple of ways you could accomplish this:
The tidiest way would be to create a Math Expression Node.
Naming it something like “(x >= minval) && (x <= maxval)” should work. It’ll do all the heavy lifting for you and combine it in a quick composite graph. After you’ve named it, change all of the variables to be of the integer type, as they default to float. Now, just pipe your variable into x and set minval to 5 and maxval to 6.
It seems there is a built-in function for comparing floats, but not for comparing integers. You could cast to a float or create a huge web of branch nodes, but the math expression node is much cleaner!
Thx for the tip guys! Convert to float works as i needed!