Students fire projectiles with A and find that a projectile is its own kind, so a hit needs a Projectile–Enemy overlap.
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 9 min · Mix it up 3 min · Make 8 min · Fireworks 3 min
A projectile is a sprite fired from another sprite, with a speed across (vx) and down (vy); vy -100 goes straight up. It is a sprite of its own kind, Projectile, not part of the ship, and the engine removes it when it leaves the screen. So a hit needs an overlap event between Projectile and Enemy. Students often pick Player, because "the player shoots": that is the planted misconception (Ben's shots pass straight through). In an overlap event, sprite is the sprite of the first kind (the shot) and otherSprite the second (the alien). The keyboard: A is space (or Z), B is enter (or X).
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.
A student is the ship and throws a paper ball (the shot) at another (the alien). The class says which two kinds touched.
The ball touched the alien, not the ship: Projectile and Enemy.
The overlap must name Projectile. Ask which two kinds touch when a shot hits.
| What you will see | A question to ask | The fix |
|---|---|---|
| Shots pass straight through the aliens. | Which two kinds does your overlap event name? | The shot is a Projectile. Change the first kind to Projectile. |
| The ship disappears when it shoots. | In the overlap event, which sprite is destroyed? | The event is probably Player–Enemy and destroys sprite (the ship). Use Projectile–Enemy. |
| Shots go down, not up. | Which way does a negative vy go? | y counts down, so up is a negative vy: -100. |
One possible solution for each task. Other correct programs are fine.

scene.setBackgroundColor(15)
let ship = sprites.create(img`
. . 9 . .
. 9 9 9 .
9 9 1 9 9
9 . . . 9
`, SpriteKind.Player)
ship.setPosition(80, 110)
controller.moveSprite(ship, 100, 0)
info.setLife(3)
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
let shot = sprites.createProjectileFromSprite(img`
5
5
`, ship, 0, -100)
})
game.onUpdateInterval(1000, function () {
let alien = sprites.create(img`
. 7 . 7 .
7 7 7 7 7
7 f 7 f 7
. 7 . 7 .
`, SpriteKind.Enemy)
alien.setPosition(randint(10, 150), 0)
alien.vy = 20
})
sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, otherSprite) {
sprite.destroy()
otherSprite.destroy()
info.changeScoreBy(1)
})

scene.setBackgroundColor(15)
let ship = sprites.create(img`
. . 9 . .
. 9 9 9 .
9 9 1 9 9
9 . . . 9
`, SpriteKind.Player)
ship.setPosition(80, 110)
controller.moveSprite(ship, 100, 0)
info.setLife(3)
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
let shot = sprites.createProjectileFromSprite(img`
5
5
`, ship, 0, -100)
})
game.onUpdateInterval(1000, function () {
let alien = sprites.create(img`
. 7 . 7 .
7 7 7 7 7
7 f 7 f 7
. 7 . 7 .
`, SpriteKind.Enemy)
alien.setPosition(randint(10, 150), 0)
alien.vy = 20
})
sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, otherSprite) {
sprite.destroy()
otherSprite.destroy()
info.changeScoreBy(1)
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
otherSprite.destroy()
info.changeLifeBy(-1)
})

scene.setBackgroundColor(15)
let ship = sprites.create(img`
. . 1 . .
. 1 1 1 .
1 1 1 1 1
`, SpriteKind.Player)
ship.setPosition(80, 110)
controller.moveSprite(ship, 100, 0)
game.onUpdateInterval(500, function () {
let alien = sprites.create(img`
. 7 . 7 .
7 7 7 7 7
7 f 7 f 7
. 7 . 7 .
`, SpriteKind.Enemy)
alien.setPosition(randint(10, 150), 0)
alien.vy = 20
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
let shot = sprites.createProjectileFromSprite(img`
4 4 4
`, ship, 0, -100)
})
sprites.onOverlap(SpriteKind.Projectile, SpriteKind.Enemy, function (sprite, otherSprite) {
sprite.destroy()
otherSprite.destroy()
info.changeScoreBy(1)
})
Open task: any program that does what the step asks.
Stretch: Make B fire two shots at a slant, one left and one right.
Support: Give students the on A pressed block with the projectile in it, and ask them only to build the hit event.
A shot hits an alien, but the game has only a Player–Enemy overlap event. What happens, and why?
Nothing. The shot is of kind Projectile, so a Player–Enemy event never runs for it.
Next lesson: read a whole game and find the blocks for each job, before the final challenge. Class idea: a two-way shooter (shots left and right with a second button).