Get ready . . .
June 2023
Make a way to keep score in your fun Scratch game!
Please visit this website if you haven't already: scratch.mit.edu
You will need: Scratch
This page is mainly about making a variable in Scratch, so we will assume you already have a game.
Go to the orange circle in the block tabs - it should be called variables.
Select the button 'make a variable', keep it on for all sprites, and give it the name score.
You always want to reset the score when you start a new game, so on one of your sprites, add the script
When green flag pressed
set score to 0
This set score block is in the variable section, and you can adjust the set amount of points to start with.
When you get a point in your game, add the block ' change score by 1' where the point gain occurs.
If you ever lose a point in your game, add the block 'change score by -1' where the point loss occurs
Click save now and share!
If you want to see variables in action, or personalised variables, see our online games section!