SCRATCH GOLD II
SCRATCH GOLD I
2 of 3

5.08 Challenge: lives and score

At the moment, you can play the game forever, but it doesn’t count how many hippos you shoot or how many times your spaceship explodes.

Can you add lives, a score, or even a highscore to your game?

It’s fun to keep track of a high score in a game.

Let’s say you have a variable called score, which gets set to zero at the beginning of each game.

Add another variable called highscore.

variables menu with Make a Variable highlighted
new variable popup box with high score as the variable name

At the end of the game (or whenever you want to update the high score), you’ll need to check whether you have a newhigh score.

code blocks require to make high score equal score
×
×

Cart