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

#1 2012-01-12 17:05:31

Oyessj
New Scratcher
Registered: 2012-01-12
Posts: 5

Game Over?

Hey. I need help. Can someone please tell me how i can do the following? Just tell me exactly what to put into the script...

When my sprite hits the edge of the stage, i want it to be "Game Over" and i want the timer to reset and a big message coming up saying "Game Over" Please someone tell me how to do it  sad  xxoxoxoxo

Offline

 

#2 2012-01-12 17:19:45

CoolPenguin
Scratcher
Registered: 2012-01-09
Posts: 39

Re: Game Over?

Try this:

The edge for the right is kind of at: 247,-12

left: -239,-6

up: 8,180

down: 6,-179

^^ You can modify these to get special locations

So the script would be

When flag clicked
wait until x position= (one of the above x's)
wait until y position= (one of the above y's)

YOU EVEN CAN USE OR TO BE MORE SPECIFIC:)

the rest could be:
broadcast game over
reset timer

then, on your game over sprite, the script would be:

when flag clicked
hide

when game over recieved
show

There you go! If you need help you can ask  smile

-CP

Offline

 

#3 2012-01-12 17:23:04

Oyessj
New Scratcher
Registered: 2012-01-12
Posts: 5

Re: Game Over?

Thank You So Much! I will try it! xoxox

Offline

 

#4 2012-01-14 18:20:52

Shadowed1
Scratcher
Registered: 2010-01-19
Posts: 100+

Re: Game Over?

if [touching<edge>]
broadcast{game over}

when I receive[game over]
show

smile


*Insert some witty, funny or sarcastic comment here*

Offline

 

#5 2012-01-23 12:59:05

Oyessj
New Scratcher
Registered: 2012-01-12
Posts: 5

Re: Game Over?

none of these work!

Offline

 

#6 2012-01-23 15:44:06

Overture
Scratcher
Registered: 2012-01-09
Posts: 91

Re: Game Over?

Oyessj wrote:

none of these work!

Do you want everything to stop at the game over? If so, you can use the Stop All block. But that stops the entire project. If you want to stop certain scripts, you can make a variable called 'Game Over' (a variable is the red-orange blocks). Then you can use the sensing system that CoolPenguin suggested above (if x or y = greater than or less than the edge coordinates) and set Game Over to 1. Then you can place an If Block inside of the scripts you want stopped, where it checks if Game Over is set to 1, and if it is 1, stop script.


http://img856.imageshack.us/img856/4728/overt.png

Offline

 

#7 2012-05-24 13:42:01

kungcuddles
Scratcher
Registered: 2012-02-14
Posts: 8

Re: Game Over?

I Need Help With This Too. Do Anyof Them Work

Offline

 

#8 2012-05-24 13:48:05

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: Game Over?

<when green flag clicked>
<forever>
<if> <touching[ edge]
<set{ (mode)} to( (game over) }>
<stop all>

Last edited by Tbtemplex97 (2012-05-24 13:49:10)


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&amp;user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#9 2012-05-24 13:50:24

kungcuddles
Scratcher
Registered: 2012-02-14
Posts: 8

Re: Game Over?

I Want My Game To Be When It Gets To 0 Lives It Is Game Over

Offline

 

Board footer