Learning Goals 3 min
By the end of this lesson you will be able to:
- Say in one sentence how
glide (1) secs to x: (0) y: (0)differs fromgo to x: (0) y: (0). - Set both the time and the destination on a glide block.
- Choose a number of seconds that makes a journey feel fast, slow, or just right.
Warm-Up 7 min
Your cat can now reach any spot in the garden instantly. That is genuinely useful — and completely invisible. Everything it does is over before anyone can look up.
Quick-fire puzzle
Wei Jie built this script and clicked the flag. What did the cat appear to do?
when flag clicked
go to x: (-200) y: (0)
go to x: (200) y: (0)
Reveal the answer
The cat simply appeared on the right. The stop on the left really happened, but it was over in a fraction of a frame, so nobody saw it.
Today’s block solves this properly. Instead of adding pauses around an instant jump, you tell the journey itself how long to take.
New Concept — the glide block 15 min
A go-to block is a teleporter: here one moment, there the next, nothing in between. A glide stretches that same trip out over a number of seconds, so the cat drifts across the garden like a leaf on water.
Blocks reference
| Block | Category | What it does |
|---|---|---|
glide (1) secs to x: (0) y: (0) | Motion | Slides the sprite smoothly to that address over the seconds you set. The script waits until it arrives. |
go to x: (0) y: (0) | Motion | From last lesson. Same destination, no journey at all. |
Three slots this time
The glide block has an extra oval at the front. Read it left to right and it says exactly what it does: take this many seconds to reach this x and this y.
when flag clicked
go to x: (-200) y: (0)
glide (2) secs to x: (200) y: (0)
Seconds are speed in disguise
The block never asks how fast to go. It asks how long to take, and works the speed out for itself. Cover the same distance in 1 second and the cat races; ask for 5 and it drifts. Cover half the distance in the same 2 seconds and it moves half as fast.
A glide holds up the script
While a glide is running, nothing else in that stack happens. The next block waits its turn. That is why glides make such tidy animations — each one finishes before the next begins.
Why it matters
Animation is motion plus time. Cartoons, games and stories all depend on watching a character travel from one place to another. Glide gives you that in a single block, with no stack of tiny move steps to manage.
Worked Example — Faiz the gliding cat 15 min
Open your garden project. We will send the cat on a slow, watchable tour and then experiment with its speed.
Step 1 — Add the hat
Drag when flag clicked into the Script Area.
Step 2 — Put the cat on its mark
Snap go to x: (-200) y: (0) underneath. Every run should start from the same place, and this is how you guarantee it.
Step 3 — Add your first glide
Scroll down the Motion category until you find glide (1) secs to x: (0) y: (0). Snap it under the go-to. Set the seconds to 2, the x to 200, the y to 0.
Step 4 — Click the flag
The cat snaps to the left, then slides all the way across the garden over two full seconds. For the first time in this arc, the journey is the interesting part.
Step 5 — Send it back
Add a second glide below, this one heading to -200. Click the flag and the cat crosses and returns — about four seconds of animation from four blocks.
when flag clicked
go to x: (-200) y: (0)
glide (2) secs to x: (200) y: (0)
glide (2) secs to x: (-200) y: (0)
Step 6 — Play with the timing
Change both glides to 1 second and run it: brisk and businesslike. Change them to 4: slow and dreamy. Try 0.3: almost back to a teleport. The blocks never changed — only the feeling did.
What changed: until today, timing was something you bolted on with waits and say blocks. Now the movement carries its own timing, which is how real animation works.
The full assembled stack (your reference)
when flag clicked
go to x: (-200) y: (0)
glide (2) secs to x: (200) y: (0)
glide (2) secs to x: (-200) y: (0)
Try It Yourself — three small builds 12 min
Goal: Slow the crossing right down. Same journey, five seconds instead of two — then try one second and compare.
when flag clicked
go to x: (-200) y: (0)
glide (5) secs to x: (200) y: (0)
Think: the distance never changed, only the time allowed for it. That is the whole idea of speed, and you just controlled it with one number.
Goal: Glide a square. Four corners, one second each side, ending exactly where it began.
when flag clicked
go to x: (-150) y: (100)
glide (1) secs to x: (150) y: (100)
glide (1) secs to x: (150) y: (-100)
glide (1) secs to x: (-150) y: (-100)
glide (1) secs to x: (-150) y: (100)
Think: in Lesson 8 a square needed moves and turns. Here four glides do it alone, because each one names where to finish rather than which way to head.
Mini-mission: the dramatic entrance. Make the cat arrive slowly from off to one side, stop in the middle to greet the garden, then leave quickly the other way — so the entrance feels grand and the exit feels sudden.
It works if: a watcher can clearly tell the arrival is slower than the departure, the greeting is readable, and the whole thing runs from one click. Stay within 8 blocks.
Think: you are not changing distances here — you are changing times. What is the smallest difference in seconds that still reads as “slow” against “fast”?
Mini-Challenge — fast cat, slow cat 5 min
“Show the difference”
Build one script that demonstrates, to someone who has never used Scratch, the difference between teleporting and gliding. They should be able to tell you which is which without you saying a word.
It works if:
- One flag click runs the entire demonstration.
- The first crossing is genuinely instant — the cat is never seen in the middle.
- The second crossing takes about three seconds and can be followed the whole way.
- There is a clear gap between the two, so they do not blur into one.
- You used only blocks from this lesson and earlier.
Reveal one valid solution (teacher)
when flag clicked
go to x: (-200) y: (0)
go to x: (200) y: (0)
say [Now watch this!] for (2) seconds
go to x: (-200) y: (0)
glide (3) secs to x: (200) y: (0)
The say block is doing real work here — without it the reset teleport back to the left becomes part of the confusion. Pupils who omit it usually discover the problem when they try to explain it to a partner.
Recap 2 min
The glide block moves a sprite smoothly to an address over a number of seconds you choose. Go-to teleports; glide takes its time. Bigger seconds mean a slower journey over the same distance, and while a glide runs the rest of the script waits. A glide always travels in a straight line, and it never turns the sprite to face where it is going.
- glide (block)
- The Motion block that slides a sprite to an address over a set number of seconds.
- secs (input)
- How long the journey should take. The script pauses until the glide finishes.
- Teleport versus glide
- Go-to arrives instantly and is for setting up; glide takes time and is for animation.
Homework 1 min
The Penang ferry. Turn the cat into a ferry crossing from Butterworth to the island, then greeting its passengers on arrival.
- Build the four-block stack below.
- Click the flag and watch the crossing.
- Try the crossing at 1 second and at 6 seconds, and decide which feels most like a real ferry.
- Screenshot your Script Area.
when flag clicked
go to x: (-200) y: (0)
glide (3) secs to x: (200) y: (0)
say [Selamat datang ke Pulau Pinang!] for (2) seconds
Bring back next class:
- A screenshot of your four-block Script Area.
- Your answer to: “Which number of seconds made the crossing feel most realistic, and why?”
Heads up for next class: SCR-L01-12 teaches point in direction (90), so the cat can finally face the way it is travelling instead of sliding sideways.