Issue Description:
I’m developing a Flappy Bird-like game in GDevelop 5. The game functions as expected during the initial playthrough:
Upon the bird’s death, the end screen displays both the current score and the high score accurately.
However, after clicking the restart button:
The game restarts, and while the current score resets correctly, the high score increments incorrectly.
Example Scenario:
First Playthrough:
Achieved Score: 5
Displayed High Score: 5
After Restart:
Achieved Score: 3
Displayed High Score: 6 (instead of remaining 5)
Observations:
I’ve noticed that altering the order of events in the event sheet affects the high score behavior. For instance, certain configurations result in the high score increasing by 2, while others cause it to display as 0. This suggests that the sequence of events might be contributing to the problem.
Request for Assistance:
I’m seeking guidance on how to correctly manage and display the high score upon restarting the game. Any insights into the proper ordering of events or best practices for handling score variables in GDevelop 5 would be greatly appreciated.
1 Like
Hi,
When you press the space key, the score increases. If the score surpasses the current high score, the new high score is saved in internal storage. This means that even if you quit the game and restart it later, the high score remains saved, unless you delete the storage. However, the regular score resets to zero every time you start the game.