انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents
Robo Block: home
0. Lab tour1
1. Getting started5
2. Motion5
3. Looks and sound5
4. Events4
5. Loops5
6. Conditions and sensing4
7. Variables and randomness4
8. Project: the “Catch Robo” game3
9. Messages: characters talk to each other4
10. Clones: one character, many copies4
11. My Blocks: make a new block3
12. Operators and time4
13. The pro project: a jumping game4

Broadcast and wait

Section 9: Messages: characters talk to each otherLesson 9.2 · ⏱ 6 min

broadcast and wait sends the message, then waits until all the blocks that received it have finished, then carries on. Useful for countdowns and scenes one after another.

🧩 Getting started
Blocks: when 🚩 clicked, go to x: (0) y: (-40), broadcast (count) and wait, say (Go!) for (3) seconds
🧩 When he receives “count”
Blocks: when I receive (count), say (3) for (1) seconds, say (2) for (1) seconds, say (1) for (1) seconds
Robo counts: 3, 2, 1
Robo counts: 3, 2, 1
Only after the countdown did he say “Go!”
Only after the countdown did he say “Go!”
📌 Note
Try the difference: change the block to plain broadcast. You will see “Go!” straight away with “3”, because it didn't wait.

📌 Another example: warm up before the race

broadcast and wait sends “warm up” and waits until the whole warm-up is over, then carries on: “Ready to race!”.

Blocks: when 🚩 clicked, go to x: (-150) y: (-40), broadcast (warm up) and wait, say (Ready to race!) for (1) seconds, glide (1) secs to x: (150) y: (-40)
Blocks: when I receive (warm up), repeat (3)
Warming up
Warming up
Off after the warm-up
Off after the warm-up
✍️ Practise
Make a countdown from 5 before Robo jumps.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Robo sends “grow” and waits until he has grown 5 times, then says “I'm big now! 💪”.

👀 Show the solution
Blocks: when 🚩 clicked, set size to (100) %, broadcast (grow) and wait, say (I'm big now! 💪) for (2) seconds
Blocks: when I receive (grow), repeat (5)
The result on the stage
The result on the stage
Medium

Robo waits for the cat to finish speaking, then he speaks.

👀 Show the solution
🧩 🤖 Robo
Blocks: when 🚩 clicked, go to x: (-130) y: (-40), broadcast (speak) and wait, say (And me after you!) for (2) seconds
🧩 🐱 Cat
Blocks: when 🚩 clicked, go to x: (140) y: (-40)
🧩 🐱 Cat
Blocks: when I receive (speak), say (My turn first 😺) for (2) seconds
Robo spoke after the cat
Robo spoke after the cat
Hard

Robo sends “draw” and waits until the square is drawn, then says “Drawing done 🎨”. What happens if you use plain broadcast?

👀 Show the solution
Blocks: when 🚩 clicked, erase all, go to x: (-50) y: (-50), point in direction (90), broadcast (draw) and wait, say (Drawing done 🎨)
Blocks: when I receive (draw), pen down, repeat (4), pen up
He said it after the drawing
He said it after the drawing
Finished the lesson? Mark it so your progress counts.