Learning Goals 3 min
By the end of this lesson you will be able to:
- Use
go to x: (0) y: (0)to send the cat straight to any spot on the Stage. - Explain the difference between moving (adding to where you are) and going to (replacing where you are).
- Build a script that visits two corners of the garden on one flag click.
Warm-Up 7 min
Last lesson you gave every spot in the garden an address — but the only way to reach one was to type numbers into Sprite Properties by hand. Today a block does it for you.
Quick-fire puzzle
Daniel built this stack. The cat started at x = 0, y = 0. Where does it land?
when flag clicked
go to x: (100) y: (50)
Reveal the answer
The cat lands at (100, 50) — right of centre and a little above it. But here is the part that matters: the block does not care where the cat started.
Prove it. Drag the cat to a random corner first, then click the flag. It snaps to (100, 50) every single time. That is a teleport, not a walk.
New Concept — teleporting instead of walking 15 min
You are at the swings in a playground and you want to reach the slide. You could walk over, step by step. Or you could blink and simply be there. Scratch offers both, and they are different blocks.
The new block
| Block | Category | What it does |
|---|---|---|
go to x: (0) y: (0) | Motion | Puts the sprite straight at that address — no sliding, no in-between. |
Two slots, in order
This block has two ovals rather than one. The first is x, the second is y — the same order you learned last lesson. Type any numbers you like into either.
go to x: (0) y: (0)— the centre.go to x: (-200) y: (150)— up and to the left.go to x: (200) y: (-150)— down and to the right.go to x: (0) y: (180)— the top edge, halfway across.
Move adds, go-to replaces
This is the idea worth remembering from today.
| Block | What it does to x and y | Does Direction matter? |
|---|---|---|
move (50) steps | Adds to the numbers you already had. | Yes — it travels “forward”. |
go to x: (0) y: (0) | Replaces the numbers with the ones you typed. | No — the cat jumps without turning. |
So a move block asks “how far?” and a go-to block asks “where?”. Choosing the right question is most of the skill.
Why it matters
Nearly every Scratch game begins with a go-to block. The player dies and jumps back to the start; a round begins and everything returns to its place. It is the simplest reset button in Scratch, and this arc will use it in exactly that way.
Worked Example — Mei Ling’s cat tours the garden 15 min
We build a two-stop tour, discover why you cannot see the first stop, then fix it.
Step 1 — Send the cat home
Select the cat and set x = 0, y = 0, Direction = 90.
Step 2 — Build the first jump
Drag in when flag clicked, then go to x: (0) y: (0) from the blue Motion category. Type -200 into the first oval and 150 into the second.
when flag clicked
go to x: (-200) y: (150)
Click the flag. The cat appears at the top-left, instantly. Check the boxes: x = -200, y = 150.
Step 3 — Add a second jump
Snap another go-to block underneath, this one set to 200 and -150.
when flag clicked
go to x: (-200) y: (150)
go to x: (200) y: (-150)
Step 4 — Click the flag and notice the problem
The cat ends up at the bottom-right. But it should have visited the top-left first — where did that go?
It happened. It was simply over before the screen could redraw. The cat really was at the top-left for a tiny fraction of a second.
Step 5 — Give each stop some time
Use a block you already know. say [Hello!] for (2) seconds holds the script while the bubble shows, which is exactly long enough to see where the cat is.
when flag clicked
go to x: (-200) y: (150)
say [I am here!] for (2) seconds
go to x: (200) y: (-150)
say [Now over here!] for (2) seconds
Step 6 — Run it again
The cat appears top-left, speaks, vanishes, reappears bottom-right, speaks again. Same two jumps as before — the only change is that you can now see them happen.
What changed: reaching an exact spot used to mean counting steps and worrying about direction. Now you name the place and the cat is there. Two ovals replace a whole stack of move blocks.
The full assembled stack (your reference)
when flag clicked
go to x: (-200) y: (150)
say [I am here!] for (2) seconds
go to x: (200) y: (-150)
say [Now over here!] for (2) seconds
Try It Yourself — three small builds 12 min
Goal: Send the cat to the very top of the garden, halfway across. Build the stack and check both boxes afterwards.
when flag clicked
go to x: (0) y: (180)
Think: x = 0 keeps the cat halfway across; y = 180 puts it on the top edge. Only the y number needed changing.
Goal: Build a reset button. Drag the cat anywhere you like with your mouse — a corner, an edge, wherever — then click the flag and watch it snap home. Try it from five different starting places.
when flag clicked
go to x: (0) y: (0)
Think: a move block would give a different answer each time, because it adds to wherever you happened to be. This one replaces, so the answer is always the same. That is the whole reason games use it.
Mini-mission: the three-landmark patrol. Send the cat to visit the butterfly, then the frog, then home — pausing long enough at each that a watcher can follow it.
It works if: one flag click visits all three in order, each stop lasts long enough to see, and the cat finishes at the centre ready to run again. Stay within 8 blocks.
Think: you already know a block that both fills time and tells the watcher what is happening. Two jobs, one block — that is how you stay under the limit.
Mini-Challenge — match the move 5 min
“Same landing, different block”
Here is an old script from Lesson 7. Starting from x = 0, y = 0, Direction = 90, it leaves the cat somewhere specific.
when flag clicked
move (150) steps
Now write a different script that lands the cat in exactly the same place — without using a single move block.
It works if:
- Your script has no move blocks at all.
- One flag click leaves the cat at exactly the same x and y as the old script did.
- It still works if you drag the cat somewhere random first — which the old script cannot manage.
- You can explain to a partner why the two scripts agree.
Reveal one valid solution (teacher)
Moving 150 steps right from (0, 0) lands on (150, 0). The new script simply names that address.
when flag clicked
go to x: (150) y: (0)
The interesting part is the third criterion. The old script only agrees when the cat starts at the origin, because it adds. The new one agrees always, because it replaces. Worth drawing out with the class.
Recap 2 min
The go-to block puts the cat at any address in one snap. Two ovals: x first, y second. It ignores Direction, and it ignores where the cat was before — it simply replaces both numbers. Move blocks add; go-to blocks replace. Ask “how far?” and you want move; ask “where?” and you want go-to.
- Teleport
- Arriving somewhere with no in-between steps. What
go to x: (0) y: (0)does. - Go to (block)
- The Motion block that sets a sprite’s x and y to the two numbers you type.
- Set versus add
- Go-to sets new numbers; move adds to the ones already there.
- Reset
- Returning a sprite to a known starting spot — usually the first block of a script.
Homework 1 min
The four-edge tour. Send the cat to each edge of the garden in turn, pausing at every one so the trip can be followed.
- Reset the cat to x =
0, y =0, Direction =90. - Build the stack below — four jumps with a one-second announcement after each.
- Click the flag once and watch the whole tour.
- Screenshot your Script Area.
when flag clicked
go to x: (-200) y: (0)
say [Stop 1] for (1) seconds
go to x: (0) y: (150)
say [Stop 2] for (1) seconds
go to x: (200) y: (0)
say [Stop 3] for (1) seconds
Bring back next class:
- A screenshot of your Script Area.
- Your answer to: “Could you do this homework with only move and turn blocks? Would it be easier or harder, and why?”
Heads up for next class: SCR-L01-11 introduces glide (1) secs to x: (0) y: (0) — the same destination, but the cat slides there smoothly instead of blinking.