Discuss Scratch

Unicorn00
New Scratcher
2 posts

How do I get game over on my game?

I figured out how to get lives on my game but I can't figure out how to make the game end when the lives reach zero. Help me
dracae
Scratcher
1000+ posts

How do I get game over on my game?

All you need to do is make a gameover sprite, and have this script in it:

Hope it helps!

(EDIT: Alternatively, you could replace the show script with an stop all script.)

Last edited by dracae (May 17, 2013 21:10:10)

Lone-Wolf
Scratcher
87 posts

How do I get game over on my game?

There are multiple ways you could do this. You could have a Health Variable, and when Health = 0, then make it broadcast Game Over, or whatever it is you want. But for lives, you must set your lives to whatever number you want when the game first opens. But when your lives equal zero, it shows the game over screen, makes you disappear etc. And to make lives get depleted, make it so that when your character is touching an “Owie” sprite or color, it changes your lives by 1 life. Or, alternatively, you could make there HP, and every time your HP equals 0 it changes your lives by -1. Here are the scripts:

Simply Lives:
When flag clicked
set to (however many lives you want)

When flag clicked
forever
if touching
change by (-1)

When flag clicked
Forever
if <(Lives) = (0)>


HP and Lives:
When flag clicked
set to (however many you want)
set to (however much)

When flag clicked
forever
if touching
change HP by (However much)

When flag clicked
forever
if <(HP) = 0>
change by (-1)
set to (Normal, full amount)

When flag clicked
Forever
if <(Lives) = (0)>
WKramer
Scratcher
26 posts

How do I get game over on my game?

best if lives < 1 because if the player would lose 3 lifes the lifes would appear as -2 and the player would not go game over

< smaller then
= equal to
> larger then
Lone-Wolf
Scratcher
87 posts

How do I get game over on my game?

WKramer wrote:

best if lives < 1 because if the player would lose 3 lifes the lifes would appear as -2 and the player would not go game over

< smaller then
= equal to
> larger then

True. Either way works.
orldea03
New Scratcher
1 post

How do I get game over on my game?

how do i get rid of the new data that i made xxxxx
magpie5212
Scratcher
100+ posts

How do I get game over on my game?

orldea03 wrote:

how do i get rid of the new data that i made xxxxx

Could you share the project with the data so people know where you put the data - then you can get help to reset it.
13NGUYENT
New Scratcher
2 posts

How do I get game over on my game?

NEED HELP! I am making this game in which you have to pop the ballons in a certain amount of time. I am not quite sure how to end the game if the player doesnt pop all the ballons. Please help!!
magpie5212
Scratcher
100+ posts

How do I get game over on my game?

(timer)
From the sensing section.

Something like…

when green flag clicked
reset timer
...
forever

if <(timer) > [60]> then // or whatever time you allow to play
say [Game Over]
stop [ v]

end
end
MCplayer
Scratcher
7 posts

How do I get game over on my game?

You do when flag clicked forever if life = 0 then brodcast death. Then go to backround programing and say when I receive death switch backdrop to backdrop 2. I hope I helped:
when [ v] key pressed
forever

if <() = []> then
broadcast [ v]

end
end
erzaflame
New Scratcher
17 posts

How do I get game over on my game?


Simply Lives:
When flag clicked
set to (however many lives you want)

When flag clicked
forever
if touching
change by (-1)

When flag clicked
Forever
if <(Lives) = (0)>


I did this. Nothing happens when the evil sprites are touched with the controlled sprite. Any Tips?
bigbird12
New Scratcher
1 post

How do I get game over on my game?

when green flag clicked
forever

if <[0] > [() ]> then
say [Game over] for (2) secs
switch backdrop to [Game over v]

end

end
jess471
New Scratcher
1 post

How do I get game over on my game?

how do you get colours to make you win
erzaflame
New Scratcher
17 posts

How do I get game over on my game?

jess471 wrote:

how do you get colours to make you win

What exactly do you mean by getting “colors” to make you win?

BTW I figured out my game over problem. Here is my project for all you struggling scratchers.

erzaflame
New Scratcher
17 posts

How do I get game over on my game?

sorry. link didn't send. here it is


my project…
qwertysj
Scratcher
1 post

How do I get game over on my game?

How do i repeat my game again and again without clicking the green flag? URGENT!!
BubblesTheLlama
Scratcher
2 posts

How do I get game over on my game?

qwertysj wrote:

How do i repeat my game again and again without clicking the green flag? URGENT!!
Here's how i would do it


I would make a variable called gamemode then u can make it so that gamemode equals 0 when you start and if gamemode = 0 then do this (something like a starting screen) then if you click something then make it change gamemode to 1. Then you can make it so if gamemode = 1 then do the game part. If you die you could set it either back to gamemode 0 or make it a gameover screen at gamemode 2. Then you could press something to change it back to gamemode one
BubblesTheLlama
Scratcher
2 posts

How do I get game over on my game?

I hope i helped
digthebone
Scratcher
500+ posts

How do I get game over on my game?

13NGUYENT wrote:

NEED HELP! I am making this game in which you have to pop the ballons in a certain amount of time. I am not quite sure how to end the game if the player doesnt pop all the ballons. Please help!!
please make a new topic on what you need help with, don't spam on other peoples topics
izajacpril
New Scratcher
1 post

How do I get game over on my game?

How do I get game over on my game, when all the darts are used but not all the sprites are gone?

Powered by DjangoBB