Save variables from multiple blueprints

Hi,

I’m looking online for some time at tutorials about saving variable in UE4 and all use the same logic to them.
In every tutorial after casting to “save game to slot” the save game object is promoted to a variable in that blueprint.
My question is: if I want save other variables that are in a different blueprint what do I have to do about the save game object because it was promoted to a variable that is in a different blueprint.

Thank you

“Load Game from Slot” returns the Save Game Object reference you need. As long as you know in what slot you save your game, you can create a new reference to the save file with this node.

Then you can just copy the variables from each blueprint into the Save Game Object locally.

Another way to make it work would be to store the SaveGame Reference in a central BP, like the GameInstance or GameMode. This way you can reference is with the “get Gamemode”/“Get GameInstance”-Nodes and then cast to access the membervar that is the Ref to your savegame object.

If you check out video #21 in the link below I go over how to perform a “Save/Load” cycle. As J-man1992 states it uses the game instance so this blueprint along with the save game variable can be accessed from any other blueprint and across multiple levels.

Hi,

Thank you for the answers J-man1992and Nebula Games Inc . I was thinking of using a game instance after I saw a video on it yesterday. I will also look at all the youtube video, i for sure learn new things.