Working with SaveGame Blueprint, How do I store variable to Save (Slot)?

I have a variable set next to my SaveGameToSlot but how do I actually save this variable information along with the specific save slot?

I am loading my game but no data is being retrieved, no variable is being saved. I just have my variable SET but I do not know how to save it to the slot in works with SaveGameToSlot.

You have to create a BP representing your SaveGame class; then you create variables in this BP which represent the data you need to save.

When you need to save your game, just create an instance (copy) of your SaveGame BP class and pass it all the needed data. Only then you can actually save your game, passing the slot name and a user index.

The docs are pretty straightforward:

There’s a node to check if a specific SaveGame exists: link text

I have that connected to my SaveGame event.
Do I need to do anything more with savegame blueprint, “New Blueprint”? I cast to it from the LoadGameFromSlot and CreateSaveGameObject

Why are you Loading on the Save event?

Basically I cannot do anything with my savegame blueprint. There are no events in there so I can’t trigger a print node to see if the values are making it to the savegame blueprint.

The values are making it to the Store Event but I’m not sure how to trigger anything inside the savegame blueprint.

Is saving my Saved Inventory and setting my Inventory not supposed to be part of LoadGame(Event)–>LoadGameFromSlot–>CastToNewBlueprint(savegame bp)?

You don’t need to. It’s just an instance of a BP class to store data, that’s it. Of course you can have it make something different or more complex, but in order to save a game you don’t need to do anything else with it except for storing data and reading data from it.

For what I know, it works like this:

Saving: you create an instance of your SaveGame BP class and put data into it, then actually save

Loading: you check if a SaveGame with certain criteria exists, if it does, create an instance of your SaveGame BP class and read data from it

You need to Cast in both cases before being able to write/read data.

Is your SaveGame BP deriving from teh SaveGame base class?