Not Updating Variable

Hey guys, got a slight problem with my score system. i swear this worked and all of a sudden it has suddenly stopped working ! i basically have a system where at the end of a game i Set high score. On first attempt it set a new high score because the default is zero.

All good so far…

My rule in the blueprint is that it only sets a new high score if its greater than the previous score. It should then set a new previous score to be read in the next game. The problem is that it’s not setting my previous score. Previous score just stays at zero… so the branch always be TRUE and change the score each time even if i don’t beat it. this never happened before and did work so I can’t see where i am going from. Please help.

Is this a level blueprint you’re showing us? Are “PreviousScore” and “HighScore” variables that are defined in the level blueprint?

This is a class blueprint and the two variables are being cast from save game blue print. This did work before and I can’t see where I have gone wrong.

Anyone have any ideas ?

The first thing that strikes me as a problem is that in the graph above you are always resetting the high score to the player’s current score no matter what that current score is. Start by fixing that and then report back whether there are additional problems.

As far as I can tell, your ‘set high score’ node seems to have an issue. It looks like you’re getting the high score of the BP_SaveGame instead of the high score in the current graph.