- Learnt27 min · one message, a pulse, layers, a ghost trick
- Basic25 min · build the dance
- Challenge 1–327 min · dance, windmill, vanish
- Extrabonus · the full routine
Review — where we got to 5 min
- Each graphic effect is a number you can set.
- A forever loop copies
(colour)intoset [color v] effect to (colour)on every part. - A slider on the Stage lets the player choose the number.
clear graphic effectsgoes under the green flag.
Quick-fire
The colour slider says 150. The head and body are orange, but the legs are still green. What is missing?
Reveal the answer
The Legs sprite has no forever loop copying the colour. Every part needs its own — which is today’s idea too: every part runs its own script.
Today’s Topic 3 min
- One
broadcast [dance v], four sprites receiving it - A size pulse that always comes back
- Layers:
go to [front v] layerandgo [backward v] (1) layers - A ghost fade between two poses
broadcast [trick v] and waitto do one move after another
Learning outcome
By the end of this lesson you will be able to:
- Start several sprites with one message and keep them in time.
- Move a sprite in front of or behind another with layer blocks.
- Fade a group of sprites out and in together, changing pose in between.
Learnt — a dance in parts 27 min
A dancing monster made of four sprites is four dancers. They need one signal to start, and the same beat to stay together.
1 · One message, four dancers
Add the Drum from the library. When it is clicked, it sends one message.
when this sprite clicked
broadcast [dance v]
Every sprite with when I receive [dance v] starts at that moment. Each part does its own move.
when I receive [dance v]
go to x: (0) y: (65)
repeat (8)
change y by (12)
wait (0.25) seconds
change y by (-12)
wait (0.25) seconds
end
when I receive [dance v]
set size to (100) %
repeat (8)
change size by (10)
wait (0.25) seconds
change size by (-10)
wait (0.25) seconds
end
when I receive [dance v]
go to x: (0) y: (-110)
repeat (8)
change x by (10)
wait (0.25) seconds
change x by (-10)
wait (0.25) seconds
end
when I receive [dance v]
point in direction (90)
repeat (8)
turn ccw (40) degrees
wait (0.25) seconds
turn cw (40) degrees
wait (0.25) seconds
end
All four wait 0.25 and repeat 8 times. So all four take 4 seconds, and they finish together.
How to use this: Click the green flag, then click the drum on the stage to start the dance.
2 · Why only the body pulses
Level 1’s pulse grew a whole sprite on the beat. Here the parts touch each other. A head that grows 10% also grows downwards, into the body. So each part gets a move that keeps the monster in one piece.
3 · Layers
Every sprite sits on its own layer, like sheets of paper in a pile. The sprite on top covers the ones below. The sprite you made last starts on top.
| Block | What it does |
|---|---|
go to [front v] layer | To the top of the pile. |
go to [back v] layer | To the bottom, right above the backdrop. |
go [forward v] (1) layers | Up past one sprite. |
go [backward v] (1) layers | Down past one sprite. |
Our pile, from the bottom: Legs, Head, Body, Arm. The Arm is right above the Body. One step back puts it behind.
Now make the arm go round like a windmill. Over the top, it is in front. Round the bottom, it goes behind.
when flag clicked
go to [front v] layer
point in direction (90)
forever
repeat (6)
turn ccw (30) degrees
wait (0.1) seconds
end
go [backward v] (1) layers
repeat (6)
turn ccw (30) degrees
wait (0.1) seconds
end
go [forward v] (1) layers
end
How to use this: Click the green flag to start it. Nothing else to press — watch it through, then use ↺ Reset to run it again.
4 · The ghost trick
A magic trick: the monster fades away, changes pose while nobody can see, and fades back. It is three steps on every part.
- Fade out:
change [ghost v] effect by (5), 20 times. That reaches 100. - Change pose, while invisible.
- Fade in:
change [ghost v] effect by (-5), 20 times. Back to 0.
A variable pose says which pose to take. The Stage flips it between 1 and 2, then sends trick.
when I receive [trick v]
repeat (20)
change [ghost v] effect by (5)
end
if <(pose) = (2)> then
point in direction (0)
else
point in direction (90)
end
repeat (20)
change [ghost v] effect by (-5)
end
when flag clicked
set [pose v] to (1)
forever
wait (1.5) seconds
if <(pose) = (1)> then
set [pose v] to (2)
else
set [pose v] to (1)
end
broadcast [trick v] and wait
end
How to use this: Click the green flag to start it. Nothing else to press — watch it through, then use ↺ Reset to run it again.
Basic — build the dance 25 min
Open your maker from last lesson. Choose a monster you like, then add the dance to it.
How to use this: Click the green flag, then click the drum on the stage. Wait for the trick to finish before clicking it again.
Step 1 — an arm
- Paint a new sprite called Arm. Draw it from the middle of the drawing area outwards, to the right.
- Put it at the body’s right shoulder.
- Give it the green-flag stack below.
when flag clicked
go to x: (55) y: (-15)
go to [front v] layer
point in direction (90)
clear graphic effects
when flag clicked
go to x: (0) y: (65)
set size to (100) %
clear graphic effects
switch costume to [three eyes v]
Step 2 — the drum
- Add the Drum sprite and its sound
Drum Bass1. - Make it keep the beat on the dance message.
when I receive [dance v]
repeat (8)
switch costume to [drum-b v]
start sound [Drum Bass1 v]
wait (0.25) seconds
switch costume to [drum-a v]
wait (0.25) seconds
end
Step 3 — three dancers
- Give Head, Body and Legs their dance stacks from Learnt.
- Click the drum. All three should stop at the same moment as the drum.
Step 4 — the windmill
- Give the Arm the dance stack below: the windmill, twice round.
- Check it goes behind the body at the bottom.
when I receive [dance v]
point in direction (90)
repeat (2)
repeat (6)
turn ccw (30) degrees
wait (0.17) seconds
end
go [backward v] (1) layers
repeat (6)
turn ccw (30) degrees
wait (0.17) seconds
end
go [forward v] (1) layers
end
Step 5 — the trick, after the dance
- Make a variable
pose. On the Stage, set it to 1 on the green flag. - Give every part its trick stack. Legs only fade out and in.
- Change the Drum’s click stack to the one below.
when this sprite clicked
broadcast [dance v] and wait
if <(pose) = (1)> then
set [pose v] to (2)
else
set [pose v] to (1)
end
broadcast [trick v] and wait
The head ends the dance floating.
Its dance stack does not start with go to x: (0) y: (65), and the drum was clicked twice.
The arm stays behind the body for ever.
The go [forward v] (1) layers at the end is missing, or it says backward.
One part stays faded after the trick.
Its fade-in adds up wrongly. Twenty times 5 out must be matched by twenty times −5 in.
The body grows bigger every dance.
Its +10 and −10 do not match, or the set size to (100) % is missing from the top.
One click, four dancers
Your own dance, started by one message.
- One click starts every part.
- Every part does a different move.
- They all finish at the same moment.
- At the end, the monster is back in one piece.
In front, then behind
An arm that goes round the monster, not only past it.
- Over the top, the arm is in front.
- Round the bottom, it is behind the body.
- The green flag always starts it in front.
Teacher note
Pupils who used go to [back v] layer will pass, and it is worth asking why that works here: the arm only overlaps the body, so being behind the legs too changes nothing you can see.
Now you see it
The ghost trick, with your own second pose.
- Every part fades out together.
- The pose changes while it is invisible.
- Every part fades back in, fully solid.
- The next trick goes back to the first pose.
Teacher reveal — the Body’s trick
when I receive [trick v]
repeat (20)
change [ghost v] effect by (5)
end
if <(pose) = (2)> then
set size to (115) %
else
set size to (100) %
end
repeat (20)
change [ghost v] effect by (-5)
end
The pose change must be inside the invisible part. A pupil who puts it after the fade-in has a monster that visibly jumps — let them see it.
The full routine
A show with four moves, one after another, from one click.
- Dance, then spin, then the ghost trick, then a bow.
- Each move starts only when the one before has finished.
- The spin uses last lesson’s whirl effect, and comes back to 0.
- The head says thank you in the bow.
How to use this: Click the green flag, then click the drum on the stage. Watch the whole show before clicking again.
Teacher reveal — the Drum’s show, and a spin
when this sprite clicked
broadcast [dance v] and wait
broadcast [spin v] and wait
if <(pose) = (1)> then
set [pose v] to (2)
else
set [pose v] to (1)
end
broadcast [trick v] and wait
broadcast [bow v]
when I receive [spin v]
repeat (20)
change [whirl v] effect by (18)
end
repeat (20)
change [whirl v] effect by (-18)
end
The bow is on the Head only: change y by (-15), then say [Thank you!] for (1.5) seconds, then change y by (15).
Summary 5 min
- One broadcast can start many sprites. Each one runs its own script.
- The same wait and the same repeat keep them in time.
- Start every move from home, so a second click cannot break the monster.
- Layers decide who covers whom.
go [backward v] (1) layerssteps back past one sprite. - The green flag does not reset layers or effects. Your scripts must.
- Layer
- A sprite’s place in the pile. Higher layers cover lower ones.
- Receiver
- A sprite with a
when I receivehat for a message. - Pose
- How the parts are arranged at one moment.
- Ghost
- The see-through effect. 0 is solid, 100 is invisible.
Hand in
Save your dancing monster and share the link. Next lesson the monster opens a shop, and customers start ordering.