Announcement

Collapse
No announcement yet.

Dictionary?

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

    Dictionary?

    When declaring a variable in blueprint you have the option to set it as a single variable or an array. There also seems to be an option to use it as a set or as a dictionary, but these options are greyed out. How do I set up a dictionary in blueprint?

    #2
    Originally posted by StevePeters View Post
    When declaring a variable in blueprint you have the option to set it as a single variable or an array. There also seems to be an option to use it as a set or as a dictionary, but these options are greyed out. How do I set up a dictionary in blueprint?
    As far as I know, not every type of variable can be defined as a Map or Set in Blueprints... Maybe there's no such limitation in c++, but I'm not sure.

    Comment


      #3
      You can use a Map. However, like Gbr mentioned not every variable type is allowed. Switch your variable from Bool to something else and THEN try to click on the icon to create a Map.

      The reason Bool doesnt work is because a bool cannot be used as a unique key on the Map
      [WIP] Procedural City Generator | RPG AI
      [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
      [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
      Join our Discord

      Comment


        #4
        Ok, I see now. You have to start with your key type and then it will let you set your value type. Is there any reason why you couldn't use a dictionary for structs? Ideally I'd like to use the player ID (for online multiplayer) as a key to look up a dict containing a struct of player data.

        Comment

        Working...
        X