Reset high score via code

Maybe a set high score to {number} or reset high score? Because I am making a game with multiple levels and I want each level to have a different high score.

Reset HighScore


You can see this by referring to the game.ts and info.ts sources.

In settings, each number is managed as a list with a KeyValue, but the determination of the high score is hard-coded in game.ts with the string “high-score”.
Therefore, it would be easier to use your own variables to manipulate the high score.

1 Like

Set HightScore

settings.writeNumber("high-score", 100);
1 Like