Discuss Scratch

BellaThePup
Scratcher
7 posts

im trying to make it that if lives 0 then game over

hello . can you hep me please this isn't working and I don't know why?
BellaThePup
Scratcher
7 posts

im trying to make it that if lives 0 then game over

tycool1
Scratcher
500+ posts

im trying to make it that if lives 0 then game over

1. The character starts touching the police, making them loose lives already
2. In order to make it work, you need to change the stop all script to less then 1 because less then blocks in scratch don't have an and equal to option.
3. I recommend putting a wait 1 second block in the loosing a life script.

I hope that whatever I said helped!!

Are you looking for a different kind of game? Click Here!!

Don't forget to try out my curated project that I am trying to achieve 5000 views on: Click Here!!
Saaka
Scratcher
21 posts

im trying to make it that if lives 0 then game over

You:
(If((variable:lives)=0)then)
(broadcast(game over))
(stop(all))

Scripts section of backdrops:
(when I receive(game over))
(switch backdrop to(Game Over!!!))

The (Game Over!!!) backdrop may be a red screen with white letters that say “Game Over!!!” or whatever you want. And you may want to include a:
(When backdrop switches to(Game Over!!!))
(hide)

in all of your sprites.
asivi
Scratcher
1000+ posts

im trying to make it that if lives 0 then game over

Saaka wrote:

You:
(If((variable:lives)=0)then)
(broadcast(game over))
(stop(all))

Scripts section of backdrops:
(when I receive(game over))
(switch backdrop to(Game Over!!!))

The (Game Over!!!) backdrop may be a red screen with white letters that say “Game Over!!!” or whatever you want. And you may want to include a:
(When backdrop switches to(Game Over!!!))
(hide)

in all of your sprites.
I agree ^^^
You can avoid the last part @Saaka suggets hidden sprites by makeing a background as an Sprite for GameOver going to front and a size covering the whole screen.
Greets.

Last edited by asivi (June 28, 2017 23:53:38)

purplewolves
Scratcher
500+ posts

im trying to make it that if lives 0 then game over

Try this, I have definitely had trouble with things like this before (This is for the cat):
when green flag clicked
forever
if <key [ right key] pressed?> then
move (10) steps
if <touching [Police man v] ?> then
stop [all v]
end
end
end
Hopefully that helps!

Please follow the Community Guidelines!

❤~✿ You are amazing, you are unique, you are worthy of love, you are loved, you are strong, you are beautiful and where ever you are in life, whatever you are fighting I know, that you can get through it. I believe in you. I assure you that there is a light at end of every tunnel, and I assure you things will get better. ✿~❤

| Scratch Welcoming Committee Curator | Past Front Page Curator #277 | Past Scratch Design Studio Helper | Scratch Wiki Contributor | | Forum Helper |

Powered by DjangoBB