Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » how to code a game over screen?
- reefrules5000
-
2 posts
how to code a game over screen?
i'm working on a game about swimming, and i'm trying to get the code to activate the game over screen when the health variable reaches zero. can anyone help with this?
- Lowqal
-
2 posts
how to code a game over screen?
Hi, a simple gameover screen be achieved by always running a check for if the Health variable is below or equal to zero, then to show a sprite (your gameover screen).
In the gameover screen sprite:
You might also want to have a “stop” block to make sure the game does not continue running in the background, and once the player has died they will need to click the green flag. You can also make a “try again” button.
In the gameover screen sprite:
You might also want to have a “stop” block to make sure the game does not continue running in the background, and once the player has died they will need to click the green flag. You can also make a “try again” button.
Last edited by Lowqal (May 28, 2024 03:15:41)
- Discussion Forums
- » Questions about Scratch
-
» how to code a game over screen?