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

Make clones

Section 10: Clones: one character, many copiesLesson 10.1 · ⏱ 7 min

create clone of myself makes a copy of the character. The copy starts the blocks under when I start as a clone. That's how you make rain, stars or lots of enemies from one character.

🧩 The original
Blocks: when 🚩 clicked, go to x: (0) y: (-120), set (score) to (0), repeat (3)
🧩 Every clone
Blocks: when I start as a clone, go to (random position), say (I'm a clone) for (5) seconds
3 clones in random places, and score = 3
3 clones in random places, and score = 3

📌 Another example: a row of clones

Robo makes a clone, then moves 80, five times, leaving a row of 5 clones behind him, then the original hides.

Blocks: when 🚩 clicked, go to x: (-160) y: (0), set size to (60) %, repeat (5), hide
5 clones in a row
5 clones in a row
✍️ Practise
Make each clone grow to a random size (pick random 30 to 120).
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Make 4 clones; each clone jumps to a random place and switches its costume.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (0) y: (0), set size to (60) %, repeat (4)
Blocks: when I start as a clone, go to (random position), next costume
The result on the stage
The result on the stage
Medium

A flower of clones: make a clone, then turn 45, eight times, and each clone walks 120 in its own direction.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (0) y: (0), set size to (50) %, point in direction (0), repeat (8)
Blocks: when I start as a clone, move (120) steps
8 clones in every direction
8 clones in every direction
Hard

Every click on Robo makes a small clone in a random place.

👀 Show the solution
Blocks: when 🚩 clicked, go to x: (0) y: (0)
Blocks: when this sprite clicked, create clone of (myself)
Blocks: when I start as a clone, set size to (50) %, go to (random position), next costume
After 3 clicks
After 3 clicks
Finished the lesson? Mark it so your progress counts.