HUD is not printing Text while playing the game

I have implemented Save & Load High Score just like this turotial:

But I’m trying to print the High Score while playing the game. I created function everything is fine. But High Score prints when my character died, after death operations.

Is it some kind of lock mechanism on “Save File” (you can’t read while some other function is accessing same file) or I’m doing something wrong?

Here is my HUD Screenshot:

You have to save changes to your savefile. Different to variables it will only change once it’s saved. The performance is good enough though to easily do this in real time without serious penalties.

So just save your savegame object everytime you change the variable and it should work.

Cheers.

I’m saving my high score after beating previous high score only or if there is no save file is present.

And I’m performing this operation after death of my character.

Then why it doesn’t show high score in middle of game?

Honestly. I am not entirely sure.

Whenever you work with savegames you should always load it when you want to read a value (like directly before you read it) and save it right after every change you do. That way it always worked for me.

I’m displaying it on HUD or should I say UMG. It display score correctly but after death. Sounds weird.

And I’m not trying to access it anywhere else. Just after death update High Score if player set new record.

Ok now I have no idea what you’re talking about…

If you just use “Load Savegame” whenever you check the variable you should always have current and accurate value. Try to work less with the reference to a savegame object. If you meant something else I did not understand it.

Maybe this screenshot may help you to understand. I’m just getting and displaying High Score on UMG.

I did see this picture in your start post.

You are using a savegame right?
They maybe try to not use the reference from your “RunCharacter” but instead load it new with the “Load Game from Slot”.

Thanks. I got it working. Here is Screenshot: