Learning Goals 3 min
By the end of this lesson you will be able to:
- Open the Costumes tab and see the poses a sprite already has.
- Use
switch costume to [costume2 v]to choose a pose from a script. - Alternate two costumes so a sprite appears to walk rather than slide.
Warm-Up 7 min
Your cat can cross a room, but look closely at how it does it. It slides, perfectly rigid, like a sticker being dragged. Nothing about it actually walks.
Quick-fire puzzle
Karthik built this and clicked the flag. What did the cat look like during that one second?
when flag clicked
switch costume to [costume2 v]
wait (1) seconds
switch costume to [costume1 v]
Reveal the answer
For that second the cat stood with its legs in a different position, then snapped back. To anyone watching, it took a single step on the spot.
The default cat has shipped with two poses since the very first lesson. You have simply never looked.
New Concept — costumes 15 min
A flip-book is a stack of drawings that are almost the same. Flick through them and the drawing appears to move, even though each page is perfectly still. A sprite’s costumes are those pages.
Blocks reference
| Block | Category | What it does |
|---|---|---|
switch costume to [costume2 v] | Looks | Changes the sprite to the named costume immediately. Position and direction are untouched. |
The Costumes tab
At the top-left of the editor, next to Code, there is a tab called Costumes. Click it and you will see every pose the selected sprite owns, numbered down the side.
Select the cat and you will find two. They differ by almost nothing — the legs and the tail. That tiny difference is the entire trick.
Costumes change looks, nothing else
A costume switch never moves a sprite, never turns it, never resizes it. The sprite stays exactly where it was and simply looks different — which is why costume blocks combine so cleanly with the motion blocks you already know.
Motion plus costume equals walking
This is the idea worth taking away. A move block on its own is a slide. A costume switch on its own is a twitch. Put them together, alternating, and you get something that reads as a creature walking.
Why it matters
Every animated character you have ever seen is built this way — a small set of poses, cycled at the right speed. Once you can switch costumes, your sprites stop being stickers.
Worked Example — a cat that actually walks 15 min
We build a slide first, then add costumes to it, so the difference between the two is impossible to miss.
Step 1 — Look at what the cat already has
Select the cat and click the Costumes tab. Two poses, numbered 1 and 2. Click each in turn and watch the cat change on the Stage.
Step 2 — Build the slide
Back on the Code tab, build a plain walk with no costume changes and run it.
when flag clicked
go to x: (-160) y: (0)
repeat (8)
move (40) steps
wait (0.2) seconds
end
Step 3 — Add one costume switch inside the loop
Drop switch costume to [costume2 v] into the loop, below the move, and run it again.
Nothing improves. The cat switches to costume 2 on the first pass and then keeps switching to the costume it is already wearing. One pose is still one pose.
Step 4 — Alternate two switches
Now add a second switch, back to costume 1, with its own wait. The loop alternates.
when flag clicked
go to x: (-160) y: (0)
repeat (4)
switch costume to [costume2 v]
move (40) steps
wait (0.2) seconds
switch costume to [costume1 v]
move (40) steps
wait (0.2) seconds
end
Step 5 — Run both versions back to back
Compare them. The distance travelled is identical, the timing is identical, and only one of them looks alive. That difference cost you two blocks.
Step 6 — Find the right speed
Change both waits to 0.05: the cat sprints, legs blurring. Change them to 1: it plods absurdly. Somewhere around 0.2 looks like an actual cat. Animation speed is something you tune by eye, not by rule.
What changed: your sprites have stopped being pictures that move and started being characters that move.
The full assembled stack (your reference)
when flag clicked
go to x: (-160) y: (0)
repeat (4)
switch costume to [costume2 v]
move (40) steps
wait (0.2) seconds
switch costume to [costume1 v]
move (40) steps
wait (0.2) seconds
end
Try It Yourself — three small builds 12 min
Goal: Make the cat take a single step on the spot, without travelling anywhere.
when flag clicked
switch costume to [costume2 v]
wait (0.5) seconds
switch costume to [costume1 v]
Think: no motion blocks at all, and yet the cat clearly moved. Costume changes alone can carry an animation.
Goal: Give the cat a nervous fidget it can hold while it talks — a pose change that keeps repeating during a line of dialogue.
when flag clicked
say [I am a bit nervous...]
repeat (6)
switch costume to [costume2 v]
wait (0.15) seconds
switch costume to [costume1 v]
wait (0.15) seconds
end
say []
Think: the plain say block is essential here. A timed one would hold the bubble up but stop the fidgeting from ever starting.
Mini-mission: two speeds of walking. Make the cat cross the room twice — once ambling, once hurrying — so a watcher can tell which is which without being told.
It works if: both crossings cover the same distance, the difference in speed is obvious, and the legs move faster during the fast one — not just the body. Keep the stack under 8 blocks.
Think: a hurrying animal takes more steps, not just bigger ones. Which two numbers do you need to change together?
Mini-Challenge — the entrance 5 min
“Walk on and introduce yourself”
Give the cat a proper entrance: it walks into the room with its legs moving, stops, and greets Abby.
It works if:
- One flag click plays the whole entrance.
- The cat’s legs visibly change pose as it travels.
- It stops before it speaks, rather than talking on the move.
- It ends in a sensible pose, not mid-stride.
Reveal one valid solution (teacher)
when flag clicked
go to x: (-180) y: (0)
repeat (3)
switch costume to [costume2 v]
move (50) steps
wait (0.2) seconds
switch costume to [costume1 v]
move (50) steps
wait (0.2) seconds
end
say [Hello, Abby!] for (2) seconds
The last criterion is the interesting one. Ending the loop on costume 1 means the cat finishes standing normally — if the loop ends on costume 2 it looks permanently frozen mid-step.
Recap 2 min
Costumes are the poses a sprite owns, listed in the Costumes tab. Switching between them changes only how a sprite looks — never where it is or which way it faces. Alternate two costumes while a sprite moves and a slide turns into a walk, which costs two blocks and changes everything about how a character reads.
- Costume
- One of the pictures a sprite can wear. Sprites often come with several.
- Costumes tab
- The tab beside Code. Shows every costume the selected sprite has.
- switch costume to
- A Looks block that changes which costume a sprite is wearing.
- Animation
- Alternating costumes fast enough that the eye reads movement.
Homework 1 min
The walk cycle. Build a walking cat, then find the speed that looks most convincing.
- Build the eight-block walk from the Worked Example.
- Try waits of 0.05, 0.2 and 0.6 seconds. Note what each looks like.
- Pick the one you think looks most like a real cat and say why.
- Screenshot your Script Area.
when flag clicked
go to x: (-160) y: (0)
repeat (4)
switch costume to [costume2 v]
move (40) steps
wait (0.2) seconds
switch costume to [costume1 v]
move (40) steps
wait (0.2) seconds
end
Bring back next class:
- Your screenshot and your chosen wait time.
- Your answer to: “Why does switching to costume2 twice in a row look like nothing happened?”
Heads up for next class: SCR-L01-27 introduces next costume, which replaces your whole alternating pattern with one block.