Announcement

Collapse
No announcement yet.

Switch on int needs improvement in BP

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

    Switch on int needs improvement in BP

    Unlike it's c++ counterpart, switches on int in BP don't allow a lot of freedom, you can choose the starting index but not the next indexes, meaning if I wan't to implement a default behavior for all values except 5 and 30, I would need to manually set 6 to 29 pins to execute the default behavior

    #2
    You can always daisy-chain Pure & Impure logic nodes and get to the same end result.
    Why not play around with InRange + Branch / SwitchonInt and see if that gets you there...
    Or even try and rework the logic. Sometimes a configuration of Select can help out too...

    Comment


      #3
      Mhh, indeed these could work but it's something so trivial in C++ that I don't understand why it's not here in bp

      Comment


        #4
        Or use switch on string and convert the int to string.

        Comment


          #5
          Originally posted by Agln View Post
          Mhh, indeed these could work but it's something so trivial in C++ that I don't understand why it's not here in bp
          Simply because BP is totally different from C++, you can't compare them like this.

          Originally posted by cyaoeu View Post
          Or use switch on string and convert the int to string.
          That sounds seriously horrible
          LinkedIn, Engine Contributions
          Polars (WIP), Game Jam Projects
          Marketplace: Viewport Utilities, Blueprint Streams, Control Structures

          Comment

          Working...
          X