Download presentation
Presentation is loading. Please wait.
Published byJocelin Osborne Modified over 8 years ago
1
PROCEDURES IN SCRATCH Message Broadcasting and Receiving
2
Agenda Holiday chat Debug it assignment Message broadcasting and receiving
3
Message Broadcasting and Receiving
4
Broadcasting Any sprite can broadcast a message using the broadcast or broadcast and wait blocks This triggers all scripts in all sprites (including the broadcaster) that begin with a matching when I receive block All sprites hear the broadcast but they only act on it if they have a corresponding when I receive block
5
Create the following scripts…. Pencil Sprite: Stage:
7
Let’s try a more complex example.. Go on to Moodle and go to 9. Procedures - Message Broadcasting and Receiving Download Flowers_nocode.sb2 and upload it to Scratch (do not try to open it) Once you’ve got it open, wait for instructions
8
Create the following code for each sprite: Note: Change this value for each sprite. Remember, you can drag and drop the script into each sprite to duplicate it.
9
Now it’s your turn to experiment: You now have a base program to manipulate. Use the remaining class time to experiment and make your own designs/programs that use the broadcast and receive blocks. Note: If you have not handed in your Debug it assignment, use the time remaining to work on it.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.