[Request] Blueprints Int switch custom numbers

The current Switch on Int only support a list from 0 adding one (0,1,2,3,4,5,6,7,8,9) and you cannot put custom numbers like a list of (12,25,45,67,78,98,99).

*Will be nice if add other switch for floats, because now for this things you need make and convert the numbers to strings and create a list.

Post in the forums old:

1 Like

I’m not sure if it’ll satisfy You, but You could make a macro for this

Example

65838-customswitch_02.jpg

No that is not what I looking for, its about have an feature for that in the engine, but thanks.

221969-123.png

Try String

1 Like

Switching on floats is not recommended because it is diffucult to be sure they are exactly equal to the value you want to check. Checking floats whether if they are between two value range or not is more convenient. Your best shot is PumpkinDaoist’s answer.

This is 2.5 years old. Besides Hevedy asked for a feature implementation rather than a hacky workaround he was clearly aware of. :wink:

Having worked with randomness a lot, I’ve always felt that a configurable int switch was missing from the engine’s toolset.

Oh sorry. I didn’t noticed the date of the question. Just see at the top of the page because of the answer.
But anyway it is important to talk about floats because it is not good to check equality or switch on them because of the rounding error. But I agree configurable output pins required when switching on ints.