Students make overlap events that run when two sprites touch, and see that the kinds named in the event decide which event runs.
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 8 min · Mix it up 3 min · Make 9 min · Fruit stall 3 min
An overlap is two sprites touching. on sprite of kind Player overlaps otherSprite of kind Food (Sprites › Overlaps) is an event: it runs when a sprite of the first kind touches a sprite of the second kind, and never for any other pair. Inside it, sprite is the first one (the player) and otherSprite the second (the coin that was touched). Every sprite has a kind: Player, Food, Enemy or Projectile. The create block starts with of kind Player, so a forgotten kind is the most common bug: a coin made as a Player is never collected. change score by (Info) shows a score at the top of the screen.
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.
Students wear kind cards (Player, Food, Enemy). The teacher reads an event ("Player meets Food: cheer"). Pairs that meet act only if their cards match the event.
A Player meeting a Player does nothing: that is Ava's star.
Swap collectors with the next pair. Read out each sprite's kind before you play.
Kinds decide which overlap runs, and sprite versus otherSprite. When a touch does nothing, ask them to read out the kinds of both sprites and the kinds the event names.
| What you will see | A question to ask | The fix |
|---|---|---|
| Touching the coin does nothing. | What kind is the coin, and what kinds does the overlap event name? | Make the coin of kind Food (the dropdown in its create block), to match Player–Food in the event. |
| The wrong sprite disappears (the player instead of the coin). | Which sprite does destroy name: sprite or otherSprite? | otherSprite is the one of the second kind (Food). Drag otherSprite into destroy. |
| The score jumps up by many points in one touch. | What happens to the coin after the touch? | If it stays where it is, the event runs again every frame. Destroy it (next lesson looks at this). |
One possible solution for each task. Other correct programs are fine.

let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(mySprite)
let coin = sprites.create(img`
. 5 5 .
5 5 4 5
5 4 5 5
. 5 5 .
`, SpriteKind.Food)
coin.setPosition(120, 60)
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
otherSprite.destroy()
info.changeScoreBy(5)
})

let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(mySprite)
let coin = sprites.create(img`
. 5 5 .
5 5 4 5
5 4 5 5
. 5 5 .
`, SpriteKind.Food)
coin.setPosition(120, 60)
let coin2 = sprites.create(img`
. 5 5 .
5 5 4 5
5 4 5 5
. 5 5 .
`, SpriteKind.Food)
coin2.setPosition(40, 100)
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
otherSprite.destroy()
info.changeScoreBy(5)
})

info.setScore(0)
let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(mySprite)
mySprite.setStayInScreen(true)
let apple = sprites.create(img`
. . 7 .
. 2 2 .
2 2 2 2
. 2 2 .
`, SpriteKind.Food)
apple.setPosition(130, 30)
let worm = sprites.create(img`
. a a .
a . . a
a . . .
. a a a
`, SpriteKind.Enemy)
worm.setPosition(40, 90)
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
info.changeScoreBy(1)
otherSprite.destroy()
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeScoreBy(-1)
otherSprite.destroy()
})
Open task: any program that does what the step asks.
Stretch: Add a second kind of good food worth 3 points. Which kinds does its event need?
Support: Give students the Food and Enemy sprites already made with the right kinds, and ask them to build only the two overlap events.
A coin is made of kind Player. The game has a Player–Food overlap event. Will touching the coin score? Why?
No. The event only runs when a Player touches a Food sprite. The coin is a Player, so no event runs. Change its kind to Food.
Next lesson adds lives and a game that ends. Class ideas: a recycling sorter (paper is Food, plastic is Enemy); design a game where the kinds are swapped: what changes?