[Solved] How do I reset the score?

Hello, I am new to creating games, I have researched here and I did not find the solution to a problem I discovered when finishing my first game at GDevelop, I hope someone can help me.
I followed the tutorials and used variables for score and lives, and I don’t know what I did wrong, but my game from the second time on starts with score 0, but when I get the first point the result of the previous game score is added .

Hard to say without knowing your events.
With a second start you mean restart the app or the scene…
Do you use filesystem for saving/loading…

But I think you should overwrite the variable with 0 at the start.

I guess is beccause you are saving the score in a global and Storage, so when the scene begins if you doesn’t get the Storage value by default that global is 0, but when you add some points you read Storage stored value that was previously saved

Thanks for the answers.

So, I followed the tutorials and this is the first level 01 event:

“At the beginning of the scene / Change the scene variable ‘Score’: set to 0”

And I didn’t use the ‘storage’ option at any point in my game, which is based on a spaceship game. Could it be a bug, since I am using the recent version of the GDevelop website?

Hi, can you upload your game somewhere to take a look to the actions?

Please as @ars_creativa says try to upload some screenshots of your events or even the entire game then we can check and help you better.

Hi guys!
I managed to solve the cumulative score problem. I had put [At the beginning of the scene / Change the Global Variable ‘score:’ set to 0 and Change the text of ‘txt_score:’ set to “score: ”+ GlobalVariableString (score)] also at ‘Game Levels Over’ and ‘Game Win’, and all they needed was just [Change the text of ‘txt_score:’ set to “score:”+ GlobalVariableString (score)].
Now I just need to improve the character arts and scenery a little bit to publish.
Thanks to everyone who got involved.

2 Likes