Passing Variables to a Character Who isn't Visible Yet.
I'm trying to implement two systems within UMG.
These two systems are :
Hat selection allows the player to choose a specific hat for the character to wear by choosing it in the main menu.
Difficulty works the same way.
The way I am planning on handling the changes are using simple "ChangeOnInt"
Having the player select No Hat in the menu, for example, would set the Integer "HatSelection" to 0.
The player blueprint would have a "ChangeOnInt" that reads "HatSelection" and sets the hat mesh accordingly.
Difficulty would work a similar way.
Normally I pass data between blueprints via casting, however, this time that is not possible, as I wish to allow the player to choose these in the main menu, before any level / the player has loaded.
Any help would be greatly appreciated. I've read up on Blueprint Interfaces and other ways but can never get it to work correctly.
There are classes that stay alive between level changes. For example the GameInstance. I guess you could set the Hat Enum there and after you startet the game you get it back from the GameInstance and Spawn the Mesh for the player. You can also use a savegame.
answered Nov 19 '14 at 11:44 AM
I've struggled with this quite a bit as well.
Most online games use their database for this and since unreal doesn't really have anything reliant which will stay the same over different character, controller, game modes and level the next best thing I found was a save game.
The performance of this node is incredible and it works pretty much like a normal BP in terms of setting and getting variables. You just have to load it first.
I'm on my mobile right now so I can't really link a few nice tutorial videos like I'd want to but I will try to do so later today :)
Follow this question
Once you sign in you will be able to subscribe for any updates here