Switch Statements

I don’t know if this is a question or a suggestion, so I’ll ask it like a question as that’s more likely. So while I was working on a very basic game I came to a point in the logic where my first thought was to add a switch statement. The problem became that is no “Switch” node in Blueprint. I guess you could use a “Select” node and an enumerator, but that seemed like a lot of work for what just became an “IF, Else IF, Else” statement made with “Branch” nodes. So my question becomes, is there a true “Switch” node that I’m missing? Because if I was doing something larger, like the classic “Input a number and the program outputs the associated month” that is generally used to teach switches, Else IF statements get a bit long. “Select” nodes with enumerators still don’t work the same as it still requires the logic before the node to figure out the right output. If there is not, then I would like to make a suggestion for a “Switch” node.

Hi LegoNinja39,

There is indeed a Switch node in Blueprints; you can base it off of Int, Name, String, or Enum values.

Ok thanks! Don’t know why I’ve never seen it nor it ever popped-up in my searches. It would be nice to have switches that could make use of floats though.