Only the last variable updated is saved

I have been looking everywhere to try and find a solution for my problem. I have a skill tree (to upgrade player stats) that is opens initially in the character create level. I have a SaveGame blueprint (“PlayerSave”) that i use to store a replication of all the players necessary stats. When i use the skill tree to update the stats in the “PlayerSave”, it is only ever the last variable that was updated that gets saved, the rest revert to default between levels. I have a feeling i am doing something wrong with the multiple “Save to slot” nodes i have in the code. How would i go about ensuring each updated variable is properly saved?

Thank you for taking the time to read on my issue.

(I know its very messy, but i just want to get it working first)


On each OnClick event you create a new save game object, set the 1 or 2 variables and save the object. But the existing object in this slot is overridden, that’s why they return to default when you load them back. So you can either create a function that reads all variables, set them in a new save game object, and saves this object or load the existing object, change one variable, and save it again.

When you create an object whether actor or widget, or savegame it initialize with default parameters. You need to create only one object and save the reference to it for your purpose. Now set or get any variable, save object in the slot, do whatever you want)

Also you get exact reference from create node, so you don’t need to cast to your class in your case.

Good luck!

In terms of coding it will looks like)

In your code you have both the casting node and the create save game node promoting to the same variable, how would i do that? (sorry for asking such basic questions)