This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-07-03 14:21:23

jason15300
New Scratcher
Registered: 2012-07-03
Posts: 1

game over screen

hi,

i need help with my game over screen i am making a ping pong game and as soon as the ball's lives go (or finish) i want the game over screen to show!


can anyone help me i would grateful



thank you




jason15300

Offline

 

#2 2012-07-03 14:26:06

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: game over screen

Here's how you do it:

The Game Over Screen's Script:

when gf clicked
hide
set [lives v] to (3) //this is probably already on the ball, I just put it here anyway
forever
if <(lives) = (0)>
show
stop all
end
end
Hope this helps!  smile

Last edited by powerpoint56 (2012-07-03 14:26:19)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#3 2012-07-04 00:48:35

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: game over screen

powerpoint56 wrote:

Here's how you do it:

The Game Over Screen's Script:

when gf clicked
hide
set [lives v] to (3) //this is probably already on the ball, I just put it here anyway
forever
if <(lives) = (0)>
show
stop all
end
end
Hope this helps!  smile

This will work, if it is not a fast paced game where the variables change quickly. If it is that type, replace

<(lives) = (0)>
with
<(lives) < (1)>


Why are the secret organizations getting all the attention?  mad

Offline

 

#4 2012-07-04 10:20:15

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: game over screen

If the game over screen is a background then use this:

when gf clicked
set lives v to (3)
change background to [game screen v]
forever if <<lives>=(0)>
change backgorund to [game over v]
end

Offline

 

Board footer