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

#1 2010-11-19 20:17:33

stephen098
New Scratcher
Registered: 2010-11-19
Posts: 2

How to display "GAME OVER" (If in wrong section please move)

Hey guys, I'm doing the classic dog chases cat game and I'm having trouble displaying Game Over. In the Game Over script I have
<hide><when green flag clicked>
<when I receive[STOP><stop all><show>
Can somebody help me please?

Offline

 

#2 2010-11-19 20:24:42

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How to display "GAME OVER" (If in wrong section please move)

So this is a sprite? Two things I'd recommend:
1. Add "go to front" on that second script
2. Verify that the game over broadcast actually broadcasts.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2010-11-19 20:34:45

stephen098
New Scratcher
Registered: 2010-11-19
Posts: 2

Re: How to display "GAME OVER" (If in wrong section please move)

Tried that, and when I first put game over in it was over top the two scripts.

Offline

 

#4 2010-11-19 20:49:01

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How to display "GAME OVER" (If in wrong section please move)

What do you mean?


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2010-11-20 07:12:04

PlutoIsHades
Scratcher
Registered: 2010-10-18
Posts: 1000+

Re: How to display "GAME OVER" (If in wrong section please move)

When you want the game to be over, broadcast (ex.) "Game Over"
Then, have the Game Over sprite appear when it receives the broadcast.   smile
http://scratch.mit.edu/forums/viewtopic.php?id=50597#req_message

http://scratch.mit.edu/forums/viewtopic.php?id=50597#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=50597#req_message


Minecraft, Redwall, and Cyberchase fan, and PROUD.

Offline

 

#6 2010-11-20 07:23:40

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: How to display "GAME OVER" (If in wrong section please move)

Put this in the dog sprite:
[blocks]
<when green flag clicked>
<forever>
<if> <touching[ cat
<broadcast[ game over
<hide>
<end>
<end>
[/blocks]

And this in the cat sprite:
[blocks]
<when I receive[ game over
<say[ Game over ]for( 2 )secs>
<hide>
[/blocks]
Hope this helps!


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&amp;online=http://lemonfanatic.webs.com/ONLINE.png&amp;offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

Board footer