Send a message
Section 4: Messages and more than one characterLesson 4.1 Β· β± 7 min
Characters talk to each other with messages. The βοΈ block sends a message in a colour, and the π© block of the same colour starts a program when it arrives.
π€ Robo

- When π© is tapped
- Say π¬ βHiβ
- Send a pink message βοΈ
πΆ Dog

- When a pink message arrives π©
- Hop π¦
π Another example: a yellow message for the cat
Robo sends the yellow βοΈ, and the cat has the yellow π©, so she hops and answers.
π€ Robo

- When π© is tapped
- Say π¬ βCat!β
- Send a yellow message βοΈ
π± Cat

- When a yellow message arrives π©
- Hop π¦
- Say π¬ βYour message arrived! πβ


βοΈ Practise
Send a message.
βοΈ Practise here in the lessonβ Close the labor open the lab in a new page β
βοΈ Practise
Fix the colour of the message.
βοΈ Practise here in the lessonβ Close the labor open the lab in a new page β
π― Challenge yourself
Easy
Robo sends pink, and the dog hops twice when it arrives.
π Show the solutionπ Hide the solution
π€ Robo

- When π© is tapped
- Send a pink message βοΈ
πΆ Dog

- When a pink message arrives π©
- Repeat π 2 times:
- β³ Hop π¦

Medium
Two messages in two colours: pink makes the cat hop, and blue makes her say βA blue message! πβ.
π Show the solutionπ Hide the solution
π€ Robo

- When π© is tapped
- Send a pink message βοΈ
- Wait β± 2
- Send a blue message βοΈ
π± Cat

- When a pink message arrives π©
- Hop π¦
- When a blue message arrives π©
- Say π¬ βA blue message! πβ

Hard
One message for two characters: Robo sends green, and the cat and the dog hop together.
π Show the solutionπ Hide the solution
π€ Robo

- When π© is tapped
- Say π¬ βGet ready!β
- Send a green message βοΈ
π± Cat

- When a green message arrives π©
- Hop π¦
πΆ Dog

- When a green message arrives π©
- Hop π¦


