Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.16
more ▼

asked Jul 14 '17 at 11:49 PM in Blueprint Scripting

avatar image

4 7 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi LegoNinja39,

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


more ▼

answered Jul 15 '17 at 12:07 AM

avatar image

116 2 6 8

avatar image LegoNinja39 Jul 15 '17 at 02:51 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question