Announcement

Collapse
No announcement yet.

There is no way to create a Set in BP

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

    [FEATURE REQUEST] There is no way to create a Set in BP

    Try it out, we've got all the boolean operators, but we can't use the set because we simply can't just add or remove from a set, nor create one...
    This is dumb.
    Icing on the cake, we can't convert Arrays to Sets.

    #2
    Originally posted by Moddingear View Post
    Try it out, we've got all the boolean operators, but we can't use the set because we simply can't just add or remove from a set, nor create one...
    This is dumb.
    Icing on the cake, we can't convert Arrays to Sets.
    Hey Moddingear. What version of UE4 are you using? I think the Set features were fully implemented in BP in 4.15. Before then you could create Sets in C++ and had some limited ability to use them in BP, but they weren't really a complete BP feature. If you've not seen it there's a breakdown of all the Set nodes on YouTube.

    With regard to converting Arrays to Sets - I think you can run a for each loop on the Array and add each element into a Set, which will do pretty much the same thing.
    On the forum, Kev will do.

    Comment


      #3
      There is an AddItems node that adds an array of items to the set. If you have cleared your set before you have converted an array to a set.
      Twitter | Multiplayer TopDown Survival Kit | Fog of War | Game Stats Kit

      Comment


        #4
        See for yourself.
        Click image for larger version

Name:	Screenshot (28).png
Views:	1
Size:	31.8 KB
ID:	1125782
        *Drops microphone*
        Last edited by Moddingear; 03-30-2017, 01:25 PM. Reason: I'm running 4.15.1

        Comment


          #5
          I hadn't really used Sets so needed to get back home before replying again. On 4.15.1 (what you're on) there are Add, Remove and as Pepeeee said add from array nodes all available.

          Click image for larger version

Name:	Set.jpg
Views:	1
Size:	37.7 KB
ID:	1125869

          Compared to arrays a 'Make Set' node is is missing from the Set functions. Other than that I think all the expected functions are there.

          I actually couldn't track down the node in your picture so not quite certain what that is, but I get similar results when dragging back from a set variable node when the variable is a Set. Context Sensitivity seems to demand that you get access to the functions by getting the Set variable and dragging forward off it, not by dragging back from a set node.
          On the forum, Kev will do.

          Comment


            #6
            Originally posted by kevdotward View Post
            Compared to arrays a 'Make Set' node is is missing from the Set functions. Other than that I think all the expected functions are there.
            Yes, that is the only thing that is stopping me from using them. Actually you have to make a variable to use them, and you can't directly make a set from an array.

            Comment


              #7
              Originally posted by Moddingear View Post
              Yes, that is the only thing that is stopping me from using them. Actually you have to make a variable to use them, and you can't directly make a set from an array.
              Ah I see, yes that's the main limitation I think. I agree it would be useful to see this added to the engine.
              On the forum, Kev will do.

              Comment


                #8
                So we gonna have this feature in 4.18, October 2017
                https://github.com/EpicGames/UnrealEngine/pull/3457

                Comment


                  #9
                  What do you need a make for?
                  If it is stopping you and you need it for-

                  - Empty, then create a set of that type and just have an empty dummy set.
                  - Const Set, then do the above but add members to it. And now you can add members to it in the details panel instead of jumping into the blueprint nodes.
                  - Doing some fancy selection logic, then do the first above, add the selection to that set.
                  - Other, then I don't know but I bet it can be solved. I mean, better than being stopped, right?

                  Comment

                  Working...
                  X