You’re going to save the game’s high score, so that players can see how well they are doing.
Create a new variable called high score
.
Select the Stage. Click on ‘My blocks’ and create a new custom block called check
.high score
Add code to your custom block so that the block checks if the current value of
in larger than the value of the score
high score
variable, and then stores the value of
as the new value of score
high score
.
Add your new custom block to the Stage script before the end of the script.
Play your game twice to check whether your score gets correctly saved as the
.high score