I’ve looked as hard as I can, and while finding similar problems, I haven’t found a solution for what i’m trying to do.
I created a GameInstance Blueprint for a save and load function. The idea is that you start on the Main Menu level, click load game, and it will set your character’s health, ammo, and location to whatever the saved reference is at. I have all of the save and load functions working except for this bit. Basically I have it set to load the level, then set variables. I think it’s trying to set the variables on the menu level and not the game level? when loading the level it sets all the variables back to default value.
Im not sure, but i think your problem is reading values from “save”… try to get variables from “loaded” object… when you create save object, you set variables there which you want to save so if you never saved different values you will get always default values imo. I think “save” is only template and you need to create such template with your saved variables and then load it… because you can have XY saved files so you need to determine which file to “load” and read values from loaded object…
Let me know if you solved it or not, if not ill recreate this and post you screens.
I actually fixed it by moving the script minus the “load level” box to the mainchar1 BP, but the issue with that is, now even on clicking new game it will load the saved variables. Someone else told me that the reason it didnt work is because when Load Level happens, it destroys the reference to mainchar1 and setting the variables never happens. Now my issue has become that I dont know how to set it to only set saved variables while loading the game, and not to set variables while pressing new game.