Save score bug?
ktfright
Member Posts: 964
I'm really close to submitting my game Shoot Shoota, but when i try to save the highest score when a user beats their previous score, it is not the same number that was supposed to be saved, it is a lower number. is it me, or is there a bug in the system?.
I'm still racking my head as to why it is doing that. any tips?
I'm still racking my head as to why it is doing that. any tips?
Comments
What is your high score logic?
Score > Bestscore,
Change attribute Bestscore to Score
Loading:
load keyword 'score' to best score attribute
play my game shoot shoota, and you could see what i mean. when i die and its game over, i have another actor that displays the score, but when i go to the menu to see my best score, the numbers are not correct at all.
So if score > high score
Constrain High score to score
Just to be clear:
game.currentScore
game.bestScore
When Game is Over
When game.currentScore > game.bestScore
Change Attribute game.bestScore To: game.currentScore
Save Attribute: game.bestScore Key: BESTSCORE
When loading
Load Attribute game.bestScore key: BESTSCORE
Load Attribute game.currentScore key: CURRENTSCORE
If you are constantly showing the high score during game play or on a menu that you can go to during game play, you would use Constrain Attribute like butterbean said.