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

#1 2009-10-27 18:08:24

fgdfgddfg
Scratcher
Registered: 2009-10-27
Posts: 2

Can't finish programming the end of the game

Well, in the website http://www.sciencebuddies.org/science-fair-projects/project_ideas/Games_p023.shtml I can't finish my project. See, at the section "Programming the end of the game", I cannot figure out how the blocks in Table 3 work. I really don't understand most of the blocks in there, and what they do.

Last edited by fgdfgddfg (2009-10-27 18:10:22)

Offline

 

#2 2009-10-27 18:22:48

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Can't finish programming the end of the game

What don't you understand?


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#3 2009-10-29 17:10:20

fgdfgddfg
Scratcher
Registered: 2009-10-27
Posts: 2

Re: Can't finish programming the end of the game

I told you in the first post:
See, at the section "Programming the end of the game", I cannot figure out how the blocks in Table 3 work. I really don't understand most of the blocks in there, and what they do.

Offline

 

#4 2009-10-30 05:42:21

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can't finish programming the end of the game

You are probably having trouble with the "Broadcast" block and the "When I Receive" block.

You use Broadcast when you want one script to start another script, usually (but not always) on a different sprite or the stage.  It's a great way to communicate between sprites or the stage.

To use it, drag out a broadcast block and click on the drop-down triangle and pick "New" and you will be prompted for a new message name.  You can make up any kind of message name but it's helpful if you pick words that relate to what you are trying to do...like "game over" or "restart game" or "change costume of cat".  After you have made a message name, you can then build scripts that will start when the message is "broadcast".  To do that, you use the "When I Receive" block.  The "Broadcast" and "When I Receive" blocks work as a team...neither one is any good without the other!

Many times you want the script that is Broadcasting to wait until the Receiving script is done running before continuing on...in that case you would use the "Broadcast and Wait" block.  If you use the "Broadcast" block (no waiting), the message gets sent but the script that sent it doesn't wait, it just keeps on running.

Broadcast messages can be a little confusing but they are incredibly powerful and well worth learning.  They are useful in all kinds of different situations such as:
1. changing the background of the stage when a sprite does something (levels)
2. signaling to sprites to hide or reappear when other sprites do something
3. building a centralized scoring system
4. many, many other things!

Remember that you can always right-click on any block and select Help to learn more about it.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer