Learning Goals 3 min
By the end of this lesson you will be able to:
- Define a clone in your own words — a temporary copy of a sprite that runs its own scripts and disappears when the project stops or when delete this clone fires.
- Name the three Control-palette clone blocks — create clone of (myself v), when I start as a clone, delete this clone — and say what each one is for.
- Decide when a project needs clones (raindrops, bullets, falling apples — anything that arrives in bulk) versus when it doesn't (a player character, a single boss, a fixed scoreboard).
Warm-Up — fifty falling durians 7 min
Picture a Scratch game where, during a thunderstorm, fifty durians fall from the top of the screen. The player has to dodge them with the arrow keys. Each durian starts at a random x at the top, falls at a random speed, and disappears when it hits the floor.
Question one: using only the sprite skills you have from Level 1 and Level 2, how would you do it?
Reveal the answer
You would have to add fifty durian sprites by hand. Right-click → duplicate → duplicate → duplicate, 49 times. Then write a falling script for each one. Then if you wanted to tweak the script (say, change the falling speed), you'd have to fix it in fifty places. The Sprite list would be a wall of "Durian", "Durian2", "Durian3"… all the way to "Durian50".
Question two: would that even work?
Reveal the answer
Sort of. The project would load and run, but it would be enormous, slow to edit, and impossible to add a fifty-first durian without another round of duplicate-and-fix. And the project would be a nightmare to maintain — every fix has to happen fifty times.
Today's idea — the clone — turns this from "fifty sprites, fifty scripts, fifty edits" into one sprite, one script, fifty copies appearing on demand. Same fifty durians, one tidy script to edit. That's the whole reason clones exist.
New Concept — what a clone actually is 18 min
A clone is one of the harder ideas in Scratch because it's invisible at first — you can't see a clone in the Sprite list, you can't click on it in the editor. So let's build the mental model carefully.
A clone is a temporary copy of a sprite
When you call create clone of (myself v), Scratch makes a brand-new copy of the sprite, instantly. The copy:
- Looks identical to the original at the moment of cloning — same costume, same size, same direction, same position.
- Starts in the same x/y as the original sprite is right then. (If the original is at x: 100, y: 50, the clone appears at x: 100, y: 50.)
- Has the same costumes and sounds as the original — it's a copy of the whole sprite, not just one frame.
- Runs its own scripts independently of the original. The original keeps doing its thing; the clone does its own thing.
- Is temporary — it vanishes the moment you call delete this clone, or when the Stop button is pressed and the project ends.
The three clone blocks — a tour
Open the orange Control palette and scroll all the way to the bottom. You'll find three blocks. They're the only three blocks Cluster D needs.
create clone of (myself v)
when I start as a clone
delete this clone
The original vs. the clones — who runs what?
This is the single most important picture in Cluster D. Imagine one sprite called Apple with two scripts:
when flag clicked
forever
wait (1) seconds
create clone of (myself v)
end
when I start as a clone
go to x: (pick random (-200) to (200)) y: (180)
glide (2) secs to x: (x position) y: (-180)
delete this clone
What actually happens:
- The original Apple sits invisible (or visible — your choice) and runs only the top script. Once a second it creates a clone.
- Each new clone instantly runs the bottom when I start as a clone script — jumps to the top of the Stage at a random x, glides down to the bottom, deletes itself.
- One sprite, fifty visible apples falling from random places. Each one is a clone, each one is running its own copy of the bottom script.
The 300-clone cap
Scratch has a built-in limit: at most 300 clones can exist at the same time across the whole project. If you call create clone of (myself v) when there are already 300 alive, nothing happens — the call is silently ignored.
In practice, 300 is a lot. The rule of thumb is: pair every create clone of (myself v) with an eventual delete this clone so old clones make room for new ones. Forget to delete, and your forever-loop spawner hits the cap, the screen fills up, and the project freezes.
When NOT to use clones
Clones are not always the right answer. Don't reach for them when:
- You only need one of something — the player character, a single boss, the scoreboard. Just use a normal sprite.
- You need things that look different from each other in a structural way — different costumes, different scripts. (Clones share everything with the original at the moment of cloning.)
- You need persistent state per copy that survives the project — clones vanish on stop, so anything you need to remember must be saved elsewhere first.
Worked Example — drawing the mental picture 10 min
Today is a concept lesson — no live coding. Instead, we'll trace through what happens, step by step, when an Apple sprite runs the falling-apple stack above. By the end, you should be able to picture clones in your head before you ever write one.
Step 1 — The flag is clicked
Project starts. The Apple sprite is sitting wherever you placed it. Both of its scripts wake up — well, one of them does, the other is waiting for its trigger.
Step 2 — The original starts its forever loop
The top stack (when ⚑ clicked → forever) belongs to the original Apple. It enters the forever loop, hits wait (1) seconds, and pauses for one second.
Step 3 — One second later: the first clone is born
The wait finishes. create clone of (myself v) fires. Scratch instantly makes a new clone of Apple. At this exact moment two things happen simultaneously:
- The original loops back to wait (1) seconds to start the count for the next clone.
- The new clone runs the when I start as a clone hat — jumps to a random x at y: 180, glides down, deletes itself after 2 seconds.
Step 4 — Second wait finishes, second clone is born
One more second passes. Another clone appears. Meanwhile, the first clone is still gliding down from Step 3. Now there are two clones alive plus the original.
Step 5 — The first clone hits the bottom
Two seconds after its birth, clone #1 finishes its glide and calls delete this clone. It vanishes from the Stage. The original and clone #2 keep going. Clone count drops back by one.
Step 6 — The pattern stabilises
Because clones are born once a second and die two seconds later, the Stage settles into having about two clones alive at a time. The original keeps spawning, each clone keeps falling for 2 seconds and dying. You see a steady drizzle of apples — never more than two on screen at once.
Step 7 — Push the spawn rate
Change wait (1) seconds to wait (0.1) seconds. Now ten clones are born every second, each lives 2 seconds. The Stage settles at around 20 clones alive at once — a heavy apple storm. Still well under the 300 cap.
Step 8 — What if you forgot the delete?
Remove the delete this clone at the bottom of the clone script. Now every clone lives forever — they pile up at the bottom of the Stage. At one clone per second, you hit 300 after five minutes and the spawner goes silent. Apples stop appearing. The project doesn't crash; it just stops being interesting.
What you just traced: the entire life-cycle of a clone — birth, independent script, death. You'll meet the actual blocks hands-on in SCR-L03-21 (spawner), SCR-L03-22 (the start-as-a-clone hat), and SCR-L03-23 (the delete block). Today is the picture in your head.
Try It Yourself — three "spot the use case" drills 10 min
Goal: Read each scenario below and decide: does this project need clones, or one normal sprite?
- A platform game with one cat that the player controls with arrow keys.
- A rain shower where 30 raindrops fall continuously.
- A spaceship that fires laser bullets every time the player presses space.
- A scoreboard that always shows the current score in the top-right of the Stage.
- A coin-collecting game where 12 coins are scattered around a level.
Think: The pattern is "many similar things" → clones. "One unique thing" → normal sprite.
Reveal the answers
1: normal sprite (one player). 2: clones (30 similar raindrops). 3: clones (the bullets are similar and arrive in bulk). 4: normal sprite (only one scoreboard). 5: clones (12 similar coins; one Coin sprite spawns 12 clones at the start of the level).
Goal: For each of these clone stacks (no need to build them — just read), say what would happen on the Stage.
when flag clicked
repeat (5)
create clone of (myself v)
end
Think: Five clones are born one after the other, all in the same instant (no wait!), all at the original's position. If the original is at x: 0, you'll see five clones stacked on top of the original — looks like just one sprite.
Reveal the answer
All 5 clones spawn instantly at the original's current x/y. Because they're stacked on top of each other and have no when I start as a clone hat to move them, you can't tell them apart. They sit invisibly inside each other for the whole project.
Goal: A friend says: "Clones are just like duplicating a sprite by right-clicking in the Sprite list." Write a one-sentence reply explaining the most important difference.
Reveal a good answer
"Right-click-duplicate makes a permanent second sprite that lives in the Sprite list forever and has to be edited separately, but a clone is a temporary copy made at runtime that shares the original's scripts and vanishes when you stop the project."
Other valid angles: "You can have 300 clones from one Sprite slot; you can't have 300 manually-duplicated sprites." Or: "Editing the original's script changes every clone's behaviour automatically — editing one duplicated sprite doesn't touch the others."
Think: Cloning is about code reuse at runtime. Duplicating is about code copy at edit-time. The first scales; the second doesn't.
Mini-Challenge — Aniq's confused Apple project 5 min
"Why is there only one apple?"
Aniq wants 10 falling apples. He has one Apple sprite. He wrote this and is upset that only one apple appears, and the original Apple isn't moving:
when flag clicked
go to x: (pick random (-200) to (200)) y: (180)
glide (2) secs to x: (x position) y: (-180)
forever
wait (1) seconds
create clone of (myself v)
end
Without any new blocks, what's wrong with Aniq's plan, and how would you fix it using the three Cluster-D blocks?
Reveal one valid solution
Aniq mixed up "what the original does" with "what each clone does". He gave the original the falling behaviour, then made it spawn clones after it finished gliding — so by the time the cloner fires, the original is at the bottom and the clones (with no when I start as a clone hat) just sit there.
The fix is to split into two scripts:
when flag clicked
hide
forever
wait (1) seconds
create clone of (myself v)
end
when I start as a clone
show
go to x: (pick random (-200) to (200)) y: (180)
glide (2) secs to x: (x position) y: (-180)
delete this clone
The original hides and just spawns. Each clone runs the falling script and deletes itself at the bottom. Same number of blocks — totally different result. Lesson: in Cluster D, the original and the clones are two different roles. The original is the factory; the clones are the products. Each gets its own stack.
Recap 3 min
A clone is a temporary, runtime copy of a sprite. It starts identical to the original — same costume, same position, same costumes and sounds — but it runs its own scripts and vanishes when delete this clone fires or when the project stops. The three Control-palette blocks are the entire vocabulary: create clone of (myself v) spawns, when I start as a clone is the clone's hat, delete this clone kills. Use clones when you need many similar things (raindrops, bullets, falling apples); skip them when you need one unique thing (the player, the boss). Remember the 300-clone cap, and always plan the death of a clone when you plan its birth.
- Clone
- A temporary runtime copy of a sprite. Identical to the original at the moment of cloning. Runs its own scripts independently. Vanishes when deleted or when the project stops.
- Original (parent sprite)
- The sprite in the Sprite list that the clone was made from. Survives all of its clones — only the clones die when delete this clone fires.
- create clone of (myself v)
- The spawner. Tells Scratch to make a new clone of the selected sprite right now. Usually placed inside a loop with a wait so clones appear over time.
- when I start as a clone
- A special green hat that only the clone runs. The original sprite ignores it. This is where the clone's life-story (its movement, its job, its death) lives.
- delete this clone
- The clone says goodbye to itself. Only the clone that calls this block disappears — the original and all other clones are unaffected.
- 300-clone cap
- Scratch's built-in limit. No more than 300 clones can exist at the same time across the whole project. New create clone of calls are silently ignored when the cap is reached.
Homework 2 min
The Clone-Or-Not Worksheet. No coding tonight — just thinking and writing.
- Open a notebook (paper or a Scratch comment). List five Scratch projects you've built before, in any level.
- For each project, ask: "Did it have many similar things on the Stage at the same time?" If yes, write down what those things were (e.g., "10 falling stars", "5 enemies").
- For each "yes" project, write how you handled it without clones (e.g., "duplicated the star sprite five times by hand").
- For each, write one sentence on how clones would have helped — fewer sprites? fewer scripts? easier to add more?
- Pick the most painful one. Save its name as
HW-L3-20-Clone-Wishlist-<projectname>.txt(or just bring the notebook page).
Bring back next class:
- Your worksheet (paper or file).
- Your answer to: "In one sentence, what is the difference between an original sprite and one of its clones?"
Heads up for next class: SCR-L03-21 meets create clone of (myself v) hands-on — the spawner. We'll wire it up inside a forever loop with a wait and watch real stars appear on the Stage. The mental model from today turns into living code.