Learning Goals 3 min
By the end of this lesson you will be able to:
- Explain in one sentence the difference between go to x: (0) y: (0) (teleport) and glide (1) secs to x: (0) y: (0) (smooth journey).
- Drag a glide (1) secs to x: (0) y: (0) block into your Script Area and set both the time and the target coordinates.
- Click the green flag and watch the cat slide smoothly across the Stage over the seconds you chose.
Warm-Up 7 min
In the last arc lesson the cat used go to x: (0) y: (0) to teleport instantly between garden spots. Today we slow that jump right down so the audience can watch the cat travel across the garden.
Quick-fire puzzle
Wei Jie built this short script. He clicked the green flag. What did the cat do?
when flag clicked
go to x: (-200) y: (0)
go to x: (200) y: (0)
Reveal the answer
The cat blinked straight to the right side. You never saw it stop on the left — both go to blocks ran so fast that the cat skipped the left position entirely. Scratch runs blocks top-to-bottom as fast as the computer can, so two teleports look like one.
Today's new block fixes that — it lets you say "take 2 seconds to get there", so the audience can watch the cat move.
New Concept — the glide block 15 min
Think of go to x: (0) y: (0) like a teleporter on a sci-fi TV show — one second the cat is here, the next it is there, nothing in between. Now imagine you stretch that journey out so it takes 2 seconds. The cat slides smoothly from start to end like a balloon floating across the room. That's glide.
Blocks reference
| Block | Category | What it does |
|---|---|---|
| glide (1) secs to x: (0) y: (0) | Motion (blue) | Slides the sprite smoothly from its current position to (x, y) over the number of seconds you set. The script pauses until the slide is done. |
| go to x: (0) y: (0) | Motion (blue) | From last lesson. Teleports the sprite instantly to (x, y). No animation. |
The glide block in a stack
when flag clicked
go to x: (-200) y: (0)
glide (2) secs to x: (200) y: (0)
Stage view of a glide
Why it matters
Animation needs time. Cartoons, games, and stories all rely on watching a character move from one place to another. glide is the easiest way to add that feeling of motion to any sprite without writing dozens of small move steps. One block, one smooth slide.
Worked Example — Faiz the gliding cat 15 min
Open Scratch. Rename your cat to Faiz the Cat using the Sprite Properties bar. We are going to make Faiz glide from one side of the Stage to the other, then back.
Step 1 — Add the start hat block
Drag when ⚑ clicked from the yellow Events category into the Script Area.
Step 2 — Teleport Faiz to the left edge
From the blue Motion category, drag go to x: (-200) y: (0) and snap it under the hat. Type -200 in the x box and 0 in the y box. Faiz jumps to the left side of the Stage the moment you press Enter.
Step 3 — Drag in your first glide
Still in Motion, scroll down until you see the glide (1) secs to x: (0) y: (0) block. Drag it under go to. Set secs to 2, x to 200, y to 0.
Step 4 — Click the green flag
Watch Faiz teleport to the left, then slide smoothly to the right over 2 seconds. The script then ends and Faiz stops at (+200, 0).
Step 5 — Add a glide back
Drag another glide (1) secs to x: (0) y: (0) block under the first glide. Set secs to 2, x to -200, y to 0. Click the flag again — Faiz now glides right, then glides back to the left.
Step 6 — Speed test
Edit both glide secs values to 1. Click the flag. The whole round trip now takes 2 seconds instead of 4. Edit them to 4 — the cat moves dramatically slowly.
What changed: last lesson, three go to blocks all ran in the blink of an eye. Today, the journey takes as many seconds as you ask for.
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: Change the glide time so the cat takes 5 seconds instead of 2 to cross the Stage.
when flag clicked
go to x: (-200) y: (0)
glide (5) secs to x: (200) y: (0)
Think: The cat travels the same distance, but at a much slower speed. Try 10 secs — almost too slow to enjoy. Try 0.5 secs — almost a teleport.
Goal: Make the cat glide in a square — top-left, top-right, bottom-right, bottom-left, and back to the start.
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: Five blocks plus the hat — still inside our 8-block cap. Each side of the square takes 1 second; the full square takes 4 seconds.
Goal: Make the cat glide to a spot, say something when it arrives, then glide somewhere else.
when flag clicked
go to x: (-200) y: (0)
glide (2) secs to x: (0) y: (0)
say [Hello, Kuala Lumpur!] for (2) seconds
glide (2) secs to x: (200) y: (0)
Think: The say block waits until its 2 seconds are up before the next glide starts. So the whole script is: glide (2s) + say (2s) + glide (2s) = 6 seconds.
Mini-Challenge — race between teleport and glide 5 min
"Fast cat, slow cat"
Build two scripts on the same cat. One uses go to to teleport the cat from left to right; the other uses glide to slide the same way over 3 seconds. Run them one after the other, with a say in the middle so you can spot the difference.
It works if:
- One click of the green flag runs the whole demo.
- The first move is instant (the audience never sees the cat in the middle).
- The second move is smooth and takes about 3 seconds.
- You only use blocks from this lesson and earlier (no repeat, no forever).
Reveal one valid solution
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 first two go to blocks happen instantly. The say gives you a moment to compare. Then the final glide shows the same journey at human speed.
Recap 2 min
Today you met the glide block. Unlike go to, which teleports a sprite in an instant, glide slides the sprite from where it is to where you want, over the number of seconds you choose. Big seconds = slow journey. Small seconds = fast journey.
- glide (block)
- A motion block that smoothly moves the sprite to a target (x, y) over a chosen number of seconds.
- secs (input)
- The time in seconds for the glide. The script pauses until the slide is finished.
- Teleport vs glide
- go to jumps instantly; glide takes time. Glide is for animation, go to is for setup.
Homework 1 min
The Penang ferry. Pretend the cat is a ferry crossing from Butterworth to Penang island. Build a script that makes the cat glide across the Stage and say something on arrival.
- Open Scratch.
- Drag when ⚑ clicked into the Script Area.
- Snap a go to x: (-200) y: (0) block under it (this is Butterworth).
- Add a glide (3) secs to x: (200) y: (0) block (this is the crossing).
- Finish with say [Selamat datang ke Pulau Pinang!] for (2) seconds.
- Click the green flag and watch the ferry cross.
Bring back next class:
- A screenshot of your 4-block Script Area.
- Your written answer to this question: "What number would you put in 'secs' to make the ferry crossing feel realistic? Why?"
Heads up for next class: SCR-L01-12 teaches the point in direction (90) block. You will discover what the numbers 0, 90, 180, and −90 mean for the way the cat faces.