How can I get my highscore working?
I have a game with a save object that adds one and saves the score every second. This part is working perfectly, but the highscore isn't. I have it checking every frame (event tick) if the curent score saved is higher than the current saved highscore. If it is, it saves the highscore every frame to the value of the current score. What's happening is it always says the highscore is just whatever the player scored last turn.
asked Jul 31 '16 at 06:10 PM in Blueprint Scripting
Im A Hefty Lad
That code is driven by "Event Construct". This means when the widget is created it's run once and the highscore won't update afterwards unless you create it again.
Instead you could create a custom event which updates the Highscore of your widget and trigger it on event construct AND from an external source. Or just use Event Tick within that widget to check for the current highscore.
Anyway. You need to update the text value. Because as it seems the stored highscore variable is updated properly. Only the text display isn't!
answered Aug 01 '16 at 10:53 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here