Armour and level swap

Why would you duplicate them in your game instance bp?

Your game save object is just a collection of variables that can be written to the disc.

In order to save the data held throughout your game code, you need to get the values held in those variables and assign them to the corresponding values within your game save. That’s the data that’s actually saved.

Then, to restore your game, you need to load the game save object from the disc and then assign those values back into the variables throughout your game code. You’re restoring the game state as it existed when you saved the game.

You get and set the values just like you would any other variable.

Your save and load functions are the functions that retrieve the values from throughout your game code and assign those values to variables in your game save, and vice versa.

Set the values in your game save in the save function.
Get the values in your game save in the load function.

Set the values in your game instance in your load function.
Get the values in your game instance in the save function.

Oops I meant if I duplicate them in my save game instance

But the variables are just booleans n integers there is no way for me to set their values.

Of course there is; they’re variables, not constants.

https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Blueprints/index.html

ok i set it up that way but im gettin alot of errors :frowning:

The errors seem to be comin from the load function tho

It’s complaining that the ActiveGameInstance variable is null.
Try putting the GetGameInstance->SetActiveGameInstance nodes into your my_character construction script, rather than attached to BeginPlay.

those are in my construct, they are in the save and load functions you gave me earlier,
when i add the load function right onto my construct script i added a print script and the load function doesnt seem to be workin on the construct

You have to get the game instance.
You’re not populating the game instance until BeginPlay.

Move the GetGameInstance node and SetActiveGameInstance nodes from BeginPlay into your constructor.

The LoadGame and SaveGame methods should not be in your constructor.

oh i got ya. ok ill try that in the morning, its super late now. hope it works, this issue is probly drivin us both nuts for different reasons lol :stuck_out_tongue:

Tried that, didnt work, keep gettin the same error, and when i start game it wont equip my weapons and armour again from that way

Can you show me how your blueprints are set up now, and where you’re calling the load methods?

ok ill post it below

thats my Load Function

and my save functions

the cast to instance in the construct script like you said.

the loads on begin play.

and with all that connected when i play, i cant equip my gear and when i stop play the errors appear.

the actors are my pickup items

Try putting the GetGameInstance->SetActiveGameInstance back in your BeginPlay, but before your sequence.
There may be something preventing it from loading in the constructor.

I can’t read your load and save functions because the image is too low rez; out of curiosity, what destroyed actors are you saving/loading?

Try putting the GetGameInstance->SetActiveGameInstance back in your BeginPlay, but before your sequence. There may be something preventing it from loading in the constructor.

tried this and still gettin those rotten errors