انتقل للمحتوى
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

Send a message and receive it

Section 9: Messages: characters talk to each otherLesson 9.1 · ⏱ 8 min

A message is a signal that a character sends, and it starts all the blocks under when I receive with the same name, in every character. That's how characters take turns, like actors.

📌 Note
Add the cat: click ➕ Character under the stage and choose “Cat”. Each character has its own blocks: click the character first, then snap its blocks.
🧩 🤖 Robo: the start
Blocks: when 🚩 clicked, go to x: (-130) y: (-40), say (Let's play!) for (2) seconds, broadcast (your turn)
🧩 🤖 Robo: when he receives “go”
Blocks: when I receive (go), glide (1) secs to x: (40) y: (-40), say (I made it!) for (2) seconds
🧩 🐱 Cat: the start
Blocks: when 🚩 clicked, go to x: (140) y: (-40)
🧩 🐱 Cat: when she receives “your turn”
Blocks: when I receive (your turn), say (I'm ready!) for (2) seconds, broadcast (go)
📌 Note
Predict before you run: who will speak first? And when does Robo move?
After two seconds: “your turn” reached the cat and she answered
After two seconds: “your turn” reached the cat and she answered
The cat sent “go”, so Robo glided and said “I made it!”
The cat sent “go”, so Robo glided and said “I made it!”
💡 Tip
Choose the message's name from the ▾ list or make a new name. Make it a clear verb: “go”, “your turn”, “done”.

📌 Another example: the cat sings

Robo asks for a song with the message “sing”, and the cat sings, then sends “clap”, so Robo claps. Two messages, in two directions.

🧩 🤖 Robo
Blocks: when 🚩 clicked, go to x: (-130) y: (-40), say (Cat, sing us a song! 🎤) for (2) seconds, broadcast (sing)
🧩 🤖 Robo
Blocks: when I receive (clap), say (Bravo! 👏) for (2) seconds
🧩 🐱 Cat
Blocks: when 🚩 clicked, go to x: (140) y: (-40)
🧩 🐱 Cat
Blocks: when I receive (sing), say (La la la 🎵), play note (60) for (0.5) beats, play note (64) for (0.5) beats, play note (67) for (0.5) beats, say (Finished!) for (1) seconds, broadcast (clap)
Robo asks
Robo asks
The cat sings
The cat sings
Robo claps
Robo claps
✍️ Practise
Make the cat send a third message “dance”, and when it reaches Robo he spins 360 degrees.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

One character sends a message to itself: space sends “jump”, and when “jump” arrives Robo jumps.

👀 Show the solution
Blocks: when (space) key pressed, broadcast (jump)
Blocks: when I receive (jump), say (Hop! 🦘) for (1) seconds, change y by (50), wait (0.3) seconds, change y by (-50)
The result on the stage
The result on the stage
Medium

A chain: Robo says “one” and sends “two”, the cat says “two” and sends “three”… and at the end Robo says “Done! ✅”.

👀 Show the solution
🧩 🤖 Robo
Blocks: when 🚩 clicked, go to x: (-130) y: (-40), say (one) for (1) seconds, broadcast (two)
🧩 🤖 Robo
Blocks: when I receive (three), say (three) for (1) seconds, broadcast (the end)
🧩 🤖 Robo
Blocks: when I receive (done), say (Done! ✅) for (2) seconds
🧩 🐱 Cat
Blocks: when 🚩 clicked, go to x: (140) y: (-40)
🧩 🐱 Cat
Blocks: when I receive (two), say (two) for (1) seconds, broadcast (three)
🧩 🐱 Cat
Blocks: when I receive (the end), broadcast (done)
The chain reached the end
The chain reached the end
Hard

One message for two characters: “everybody dance” makes Robo and the cat spin a full turn together.

👀 Show the solution
🧩 🤖 Robo
Blocks: when 🚩 clicked, go to x: (-130) y: (-40), point in direction (90), say (Dance with me! 💃) for (1) seconds, broadcast (everybody dance)
🧩 🤖 Robo
Blocks: when I receive (everybody dance), repeat (4), say (We danced together!) for (2) seconds
🧩 🐱 Cat
Blocks: when 🚩 clicked, go to x: (140) y: (-40), point in direction (90)
🧩 🐱 Cat
Blocks: when I receive (everybody dance), repeat (4)
They danced together
They danced together
Finished the lesson? Mark it so your progress counts.