Switch on Int - Range?


Just wondered if there was a way to use a Switch on Int node, but with numbers in ranges… for example, if I had the numbers 1-10, the Switch node would have 10 pins coming out of it, one for each value, but if I wanted the execution for value 3-7 to run to the same place, is there a way to implement a “range” in there somehow?

Thanks in advance.

There is no built-in, ready to go functionality like this in the engine. Not in a single node.

  • you could collapse the 3-7 pins manually (connect them to a single reroute node)
  • or you can write a custom macro to handle it, the InRange (int) node will be useful here, something along the lines of:

Also, do have a look at the [Extended Library][2], it’s free and comes with a ton of useful nodes, perhaps it contains precisely what you need.


Thank you for the confirmation on this, I often find, as someone new to Unreal, that I miss nodes because I don’t know what they’ll be called. For now I’ve used the InRange(integer) node with 3 Branch nodes, thankfully I didn’t have many values.

Thanks again for your help :slight_smile: