Announcement

Collapse
No announcement yet.

Found a way to make a 'Pure' switch - sort of.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    xulture, I had no idea you could add pins to select node . Thanks for sharing

    Leave a comment:


  • replied
    That's cool - thanks for the info, i didn't spot the add option pin.

    Leave a comment:


  • replied
    If you run Integer into Select, you can add option pins with right click:

    Click image for larger version

Name:	SelectOnInt.jpg
Views:	1
Size:	85.7 KB
ID:	1098056

    If you get enum (or custom enum) and create select from it, it will already populate options for you:

    Click image for larger version

Name:	SelectOnEnum.JPG
Views:	1
Size:	50.0 KB
ID:	1098057

    Leave a comment:


  • replied
    yes, its called SWITCH
    on %enum name
    or on int, string, name

    Leave a comment:


  • replied
    God, i'm such a div! I've just found all of the select nodes. Can any of these switch more than 2 options?

    Leave a comment:


  • replied
    Bum - and because that's too short to post... Bums.

    Leave a comment:


  • replied
    Why not use built-in select? It automatically sets types of inputs based on where output is connected. And it automatically sets type of 'Index' depending on what you plug into it..

    Click image for larger version

Name:	BuiltInSelect.JPG
Views:	1
Size:	62.5 KB
ID:	1098054

    Leave a comment:


  • started a topic Found a way to make a 'Pure' switch - sort of.

    Found a way to make a 'Pure' switch - sort of.

    Hi, I've just worked this out and wanted to share it!

    This might be common practice or obvious to some people, but for me it's going to revolutionise the way I blueprint!

    I hate making temporary variables for transforms and other values - I always wanted there to be some kind of bool switch for variables. In this example I have 2 target transforms for an object in my game. Before this revelation I had my 2 targets as transform vars - when it came to choosing which one I wanted based on a bool, i'd set a new temporary transform var to one or the other of these.

    I could have forked my exec path to 2 duplicate paths with one or the other, but it's not neat to do that - enter the Lerp! Using a bool converted to a float I can put my 2 vars into a transform lerper and effectively have a 'pure' switcher to select one or the other without any messyness!

    Click image for larger version

Name:	BoolSwitch.jpg
Views:	1
Size:	295.4 KB
ID:	1169677

    Yay!
Working...
X