What is wrong whit my savegame blueprint?

Hello! Im trying to make a blueprint that saves a value(highscore) so it will load every time the game is loaded, but at this moment it does save the highscore and loads it correctly while the game is launched, but then, if you get even one point, the highscore value changes to the amounts of points at the moment even they are not higher then highscore. For example I load the game and the highscore is 10, but then I start playing and get one point, the highscore changes to 1.

Sorry for bad english and all help is appreciated! Please help stupid beginner!

Here’s the save game 101:

You can’t do it on tick, tick happens every frame. You probably don’t want to be reading and writing the save game every frame.

You have to create it before you can use it.


How am I able to get the highscore update Ă­ngame whitout tick? Thank you for your answer!

I just looked at your code a bit more closely. Notice that you’re creating a new save game object every tick and writing it back out. Because of this, your save game will always be empty.

Take another look at my hint. You only need to make the SG once.

If you’re calculating something on tick, you don’t need to keep reading / writing it to the save game.

You only need to use the save game when you want to actually store the data because the player is quitting the game ( or you’re worried about losing progress ). The rest of the time, you can update that integer on tick, but just not concern yourself with the SG.

1 Like

I managed to fix my blueprint thanks to your help. Thank you a lot. It is awesome to have such a helpfull UE community!