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

Build the game

Section 8: Project: the “Catch Robo” gameLesson 8.2 · ⏱ 10 min
🧩 The first script: Robo jumps
Blocks: when 🚩 clicked, set (score) to (0), forever
🧩 The second script: when he is caught
Blocks: when this sprite clicked, change (score) by (1), play sound (Pop) until done, say (Nice!) for (0.3) seconds
🖥️ What happens on the stage?
Robo jumps every second. Every time you click him he makes a sound, says Nice! and your score goes up.

📌 Another example: Robo appears and disappears

Robo shows up for one second in a random place, then hides. Click him while he is showing to get a point.

Blocks: when 🚩 clicked, set (score) to (0), forever
Blocks: when this sprite clicked, change (score) by (1), hide
We got a point
We got a point
✍️ Practise
Build the game and play it twice. How many points did you get in 30 seconds?
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Add a time limit: a second script under the flag waits 3 seconds (try 30 in your game), then says “Time's up! ⏰” and stops everything.

👀 Show the solution
Blocks: when 🚩 clicked, set (score) to (0), forever
Blocks: when 🚩 clicked, wait (3) seconds, say (Time's up! ⏰) for (1) seconds, stop all
Time's up
Time's up
Medium

Make the game harder: every good click makes Robo 5 smaller.

👀 Show the solution
Blocks: when 🚩 clicked, set size to (100) %, set (score) to (0), forever
Blocks: when this sprite clicked, change (score) by (1), change size by (-5)
After two points he got smaller
After two points he got smaller
Hard

Show the score above Robo after each click, and at 3 points he says “I won! 🏆” and the game stops.

👀 Show the solution
Blocks: when 🚩 clicked, set (score) to (0), forever
Blocks: when this sprite clicked, change (score) by (1), say (join Your score:  score), if <(score = 3)> then
We reached 3
We reached 3
Finished the lesson? Mark it so your progress counts.