Learning Goals 3 min
By the end of this lesson you will be able to:
- Assemble six blocks — when ⚑ clicked, point in direction, glide, if on edge, bounce — into a single working script.
- Click the green flag and watch the cat glide right, bounce, glide left, then bounce again.
- Edit at least one number in the script (glide time, target x, or direction) and predict how the bounce will change.
Warm-Up 7 min
Over eight lessons you have collected every part: smooth motion (glide), facing a direction (point in direction), and edge-bouncing (if on edge, bounce). Today we glue them all together into the finished arc showpiece — and then ship it.
Quick-fire puzzle — name the missing block
Here is a 5-block script. There is one block missing between "glide" and "glide" that we definitely need today. Which block is it, and why?
when flag clicked
point in direction (90)
glide (2) secs to x: (200) y: (0)
glide (2) secs to x: (-200) y: (0)
Reveal the answer
The missing block is if on edge, bounce. After the first glide, the cat sits at the right edge of the Stage facing right. Without a bounce, the cat would still be facing right when the second glide starts — it would awkwardly slide backwards. Adding if on edge, bounce flips it to face left first, so the second glide travels "forward" the way the cat is now facing.
Today's project adds exactly that block — and a second bounce at the other end.
New Concept — putting the cluster together 15 min
The four blocks of this cluster (B · Motion Blocks) each do one tiny job. On their own they barely matter. Snapped together in the right order, they make a sprite feel alive. Think of it like cooking — flour, eggs, butter, sugar are nothing on their own; mixed in the right order, you get a cake.
Blocks reference (everything we have so far)
| Block | Category | Job in today's project |
|---|---|---|
| when ⚑ clicked | Events (yellow) | Starts the whole script when the user clicks the green flag. |
| point in direction (90) | Motion (blue) | Faces the cat right at the start, so the first glide travels "forward". |
| glide (2) secs to x: (200) y: (0) | Motion (blue) | Slides the cat smoothly from where it is to the right-edge target over 2 seconds. |
| if on edge, bounce | Motion (blue) | Flips direction by 180° when the cat hits an edge. Used twice — once at each end. |
The plan on the Stage
Why this is a project lesson
For three lessons we have been learning one block at a time. Today is different — instead of one new block, we are combining four blocks you already know into a single, complete animation. Project lessons are where the cluster becomes a finished thing you can show off.
Guided Build — Mei Ling's bouncing cat 15 min
Open Scratch. Rename the cat to Mei Ling's Cat using the Sprite Properties bar. Make sure the cat sits roughly in the middle of the Stage.
Step 1 — Add the start hat
Drag when ⚑ clicked from the yellow Events category into the Script Area.
Step 2 — Face the cat right
From the blue Motion category, drag point in direction (90) and snap it under the hat. 90 means right — that is the direction the first glide will travel "forward" along.
Step 3 — First glide: race to the right edge
Drag glide (1) secs to x: (0) y: (0) under the point block. Change secs to 2, x to 200, y to 0. Click the flag once — the cat slides smoothly to the right side. It is now close to the right edge.
Step 4 — First bounce
Drag if on edge, bounce under the glide. The cat is now touching (or very near) the right edge, so the bounce flips its direction from 90 to -90. The cat now faces left.
when flag clicked
point in direction (90)
glide (2) secs to x: (200) y: (0)
if on edge, bounce
Step 5 — Second glide: race back to the left edge
Drag another glide (1) secs to x: (0) y: (0) under the bounce. Change secs to 2, x to -200, y to 0. The cat now glides smoothly to the left side.
Step 6 — Second bounce
Drag one more if on edge, bounce at the very bottom. The cat hits the left edge and flips direction back to 90 (facing right) — ready for another round-trip on the next click.
Step 7 — Click the green flag
Watch the full animation. The cat glides right (2 seconds), bounces, glides left (2 seconds), bounces. Total: about 4 seconds. Click again — the cat does another full round-trip.
What changed: last lesson, you had one bounce in a script. Today, you have two bounces — and the cat travels the full Stage width between them. With one flag click, the cat completes a full there-and-back journey.
The full assembled stack (your reference)
when flag clicked
point in direction (90)
glide (2) secs to x: (200) y: (0)
if on edge, bounce
glide (2) secs to x: (-200) y: (0)
if on edge, bounce
Try It Yourself — extend the project 12 min
Goal: Add a cheerful shout in the middle of the trip. Snap a say block between the two glides so the cat says something at the right edge.
when flag clicked
point in direction (90)
glide (2) secs to x: (200) y: (0)
if on edge, bounce
say [Bounce!] for (1) seconds
glide (2) secs to x: (-200) y: (0)
if on edge, bounce
Think: Seven blocks now — still inside the 8-block cap. The total run time goes from 4 seconds to 5 seconds because the say adds 1 second.
Goal: Make the cat much slower. Change both glide times to 5 seconds and watch the trip become a long, lazy stroll.
when flag clicked
point in direction (90)
glide (5) secs to x: (200) y: (0)
if on edge, bounce
glide (5) secs to x: (-200) y: (0)
if on edge, bounce
Think: The same six blocks now take 10 seconds. Compare with 1 sec each — the trip flashes by in 2 seconds. Glide time is your speed control.
Goal: Bounce off the top and bottom edges instead of left and right.
when flag clicked
point in direction (0)
glide (2) secs to x: (0) y: (150)
if on edge, bounce
glide (2) secs to x: (0) y: (-150)
if on edge, bounce
Think: Direction 0 = up. Glide to (0, 150) heads upward to the top edge. The bounce flips direction to 180 (down). The cat then glides to (0, -150) and bounces off the bottom. Same idea, different axis.
Mini-Challenge — add a new sprite or rule 5 min
"Two cats bouncing past each other"
Add a second sprite (the Sprite library has plenty — try the orange "Cat 2" or any animal). Give it a similar bouncing script, but make it start at the opposite end and travel the other way. The two sprites should pass each other in the middle.
It works if:
- One click of the green flag starts both sprites moving.
- Sprite 1 (cat) starts on the left and bounces toward the right.
- Sprite 2 (new sprite) starts on the right and bounces toward the left.
- You only use blocks from today and earlier lessons (no repeat, no forever).
Reveal one valid solution
Both scripts use the same six blocks, but the second sprite faces the opposite direction at the start.
when flag clicked
point in direction (90)
glide (2) secs to x: (200) y: (0)
if on edge, bounce
glide (2) secs to x: (-200) y: (0)
if on edge, bounce
when flag clicked
point in direction (-90)
glide (2) secs to x: (-200) y: (0)
if on edge, bounce
glide (2) secs to x: (200) y: (0)
if on edge, bounce
Click the cat's card in the Sprite list to attach the first script; click the new sprite's card to attach the second. Click the flag — both scripts run at once because every sprite hears the green flag.
Recap 2 min
Today you assembled the whole B-cluster of motion blocks into one short, polished animation. Hat block to start. Point in direction to set "forward". Glide to slide smoothly. Bounce to flip at the edge. Repeat the glide-bounce pair to come back. Six blocks, one click, a complete cat round-trip.
- Project
- A complete tiny artefact you can run and show off. Different from a single concept lesson — projects assemble several blocks together.
- Round-trip
- A there-and-back animation. In today's project: glide right, bounce, glide left, bounce — back where you started.
- Cluster
- A group of related lessons that build toward one shared outcome. Today's project is the capstone of cluster B (Motion Blocks).
Homework 1 min
Faster, slower, taller. Take today's six-block project and change two of its numbers. Hand in a screenshot of the modified script.
- Open the Scratch project you built in class.
- Change both glide secs values. Try
0.5(super fast) or4(slow). - Change both glide target y values from
0to120. Now the cat bounces along the upper half of the Stage instead of the middle. - Click the flag and watch.
Bring back next class:
- A screenshot of your modified 6-block Script Area.
- Your written answer to this question: "Why does the cat still bounce at
y = 120instead of going off the top? Isy = 120close to a top or bottom edge?"
Heads up for next class: SCR-L01-15 revisits when ⚑ clicked in detail and opens the C cluster: Events & Repeats. By SCR-L01-19 you will finally meet repeat (10), the block that loops your cat-bounce automatically without you clicking the flag again.