Students hand a sprite to the arrow keys with move with buttons, and see that its two numbers are speeds across and down, not a place.
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Predict and Run 7 min · Investigate 10 min · Modify 10 min · Make 8 min · Goalkeeper 5 min
move with buttons (Controller) hands a sprite to the arrow keys: it moves while a key is held. Its two numbers (click + to show them) are the speeds across and up and down, in pixels per second; 0 stops movement that way. They are not a position. on A button pressed is an event: it runs each time A (space or Z) is pressed. Students must click the simulator before it hears keys.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
One student is the sprite. The class holds up cards: across speed and up-down speed. The 'remote' presses arrows; the sprite moves only the ways its speeds allow.
A speed card of 0 means that direction is locked.
Swap ships with the next pair. Can theirs leave the screen?
Reading the two numbers as speeds, not a place. Ask what each number does while a key is held.
| What you will see | A question to ask | The fix |
|---|---|---|
| The arrow keys do nothing. | Did you click the simulator? Is there a move with buttons block? | Click once on the game screen so it hears the keyboard, and check move with buttons names the right sprite. |
| The sprite flies off the edge. | What stops it at the edge? | Add set stay in screen for that sprite. |
| The sprite moves up and down when it should not. | Which number is the speed up and down? | Click + on move with buttons; set the second number to 0. |
One possible solution for each task. Other correct programs are fine.

scene.setBackgroundColor(9)
let plane = sprites.create(img`
. . . . 2 . . .
2 . . . 2 2 . .
2 2 1 1 1 1 1 2
2 . . . 2 2 . .
. . . . 2 . . .
`, SpriteKind.Player)
plane.setPosition(20, 60)
controller.moveSprite(plane, 100, 0)

scene.setBackgroundColor(9)
let plane = sprites.create(img`
. . . . 2 . . .
2 . . . 2 2 . .
2 2 1 1 1 1 1 2
2 . . . 2 2 . .
. . . . 2 . . .
`, SpriteKind.Player)
plane.setPosition(20, 60)
controller.moveSprite(plane, 100, 0)
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
plane.x += 30
})

scene.setBackgroundColor(15)
let ship = sprites.create(img`
. . 1 . .
. 1 1 1 .
1 1 1 1 1
`, SpriteKind.Player)
ship.setPosition(80, 105)
controller.moveSprite(ship, 100, 0)
ship.setStayInScreen(true)
Open task: any program that does what the step asks.
Stretch: Make A dash right and B dash left, and make the ship faster across than the plane was.
Support: Give students the ship with move with buttons already in, and ask them only to set the two speeds and keep it on the screen.
move with buttons has speeds 0 and 80. Which arrow keys do something?
Only up and down. The first number, the speed across, is 0.
Next lesson: a speed the engine applies by itself, so a sprite keeps moving with nobody pressing anything.