Can save Integer Value but not Reload it, it resets to 0

Hello! I am currently working on a quest framework for my project but I am having trouble reloading the quest stages, which is a Int Value stored in an Actor(SunRotStore). When I save it, I am saving the int value from the actor into my Save Game Object’s int value, and it seems to work in that it will print the string. However, when I reload it resets it back to 0.

The class defaults are 0, but other int values in other actors (PlayerCharacter) are also 0 as default and they seem to save and reload without trouble so I am scratching my head a little on where I went wrong here as it’s the only int value that is not reloading.

Save:

Load:

Example of Int Values that Save and Reload:


Saving and Loading Functions are in a Widget Blueprint (Pause Menu)


On initialization, I get the actor 9Sun Rot Store) and promote it to a local variable (Sun Rot Store)

Originally it was created to store the values of the directional light/sun for saving and loading, but I opted to put the quest framework inside it as well since it existed already.

If anyone can help out, I would really appreciate it as I am feeling a bit lost on where I went wrong ;o;

Happy new year as well!

This is your problem

image

Think about what happens when the save game exists: You create a new save game object.

If it exists, you need to read it :slight_smile:

Ooh I see!! Thank you so much :slight_smile:

1 Like