Install MyHighschool on your device for quick access

Add to Home Screen (iPhone & iPad)

  1. Tap the Share button (square with an arrow pointing up).
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add to confirm.

Install or add to your home screen

This browser does not support the automatic install banner. Open the menu (often or ) and look for Install, Add app, or Add to Home Screen.

MyHighschool
Chapter 4

Tap Storm

Tap Storm — beat the clock

Sign in to download the sprite starter .sb3 for this chapter.

Use the manual below to learn the ideas and build the lab in Scratch — download the sprite starter under the chapter title first. (~27 min)

Build Tap Storm — click targets before the countdown hits zero, track score and misses, and handle game over when time runs out.

What you will learn in this chapter

Variables

Variables

Score, timer, and round store numbers that change every Tap Storm round.

Conditionals

Control · Operators

if / else decides what happens when time is up or the player clicks too late.

Mouse sensing

Sensing · Events

when this sprite clicked detects hits on moving targets.

Random placement

Operators · Motion

pick random and go to x: y: spawn targets in new spots each round.

Game state

Variables · Control

A gameState variable groups waiting, playing, and game over so logic stays readable.

Read the ideas below, then follow the build steps in Scratch to make A timed clicking game where targets pop up randomly and you score as many hits as possible in 30 seconds.. When you are ready, continue to the concept check.

How this chapter works

  • Step 1 — Read and build from this manual (learn the ideas, then follow Part B in Scratch).
  • Step 2 — Pass the concept check on the course page.
  • Step 3 — Submit on the course page when your project matches the checklist.
  • Step 4 — Optional bonus: extend your project for two players (unlocks after you submit).

Work in order: learn the ideas first, pass the concept check on the course page, then build the lab below. Save your Scratch project at each save point.

Learn the ideas

By the end of this chapter you will build: A timed clicking game where targets pop up randomly and you score as many hits as possible in 30 seconds.

Build Tap Storm — click targets before the countdown hits zero, track score and misses, and handle game over when time runs out.

What you will learn in this chapter

  • Variables (Variables) — Score, timer, and round store numbers that change every Tap Storm round.
  • Conditionals (Control · Operators) — if / else decides what happens when time is up or the player clicks too late.
  • Mouse sensing (Sensing · Events) — when this sprite clicked detects hits on moving targets.
  • Random placement (Operators · Motion) — pick random and go to x: y: spawn targets in new spots each round.
  • Game state (Variables · Control) — A gameState variable groups waiting, playing, and game over so logic stays readable.

After this chapter you can

  • Run a countdown timer that stops gameplay at zero
  • Award points only when a target is clicked in time
  • Move or respawn targets with random positions
  • Show game over and replay with a clean green-flag reset

Study the ideas below, then pass the concept check on the course page before you build the lab in Scratch.

How fast are your reflexes? Tap Storm throws clickable targets onto the Stage for 30 seconds — every hit adds points. You will learn timers, random positions, and how to build pressure without chaos.

Studio Cat: Studio Cat says: missing a target is fine. Missing the save button is not. Save after every working version.

Sketch first

Sketch six target spots scattered on the Stage. Draw a big timer reading 30 in the corner and a score label next to it.

Random keeps it fresh

If the target always appears in the same place, the game gets boring in ten seconds. go to x: (pick random -200 to 200) y: (pick random -150 to 150) from Motion uses Operators to jump anywhere.

Key vocabulary

Timer A countdown or count-up that limits or tracks play time.
Random A value Scratch picks unpredictably within a range you set.
Click event A script that runs when the player clicks a sprite.
Score A running total of successful actions in the game.

Build the chapter lab

Follow each part in Scratch while you read — use save points in Part B below. When your project matches the checklist, pass the concept check and submit on the course page.

Your lab for this chapter: A timed clicking game where targets pop up randomly and you score as many hits as possible in 30 seconds.

Part A - Build the popping target

Studio Cat: Sprite starter file. Before you build in Scratch, open this chapter on MyHighschool and click the green Download sprite starter (.sb3) button under the chapter title (you can also use it again in Step 1 — Read & Build). Open the file in Scratch — sprites and backdrops are already named. The starter has no scripts; add blocks from Part B of this manual.

Create one target sprite that hides, jumps to a random spot, and adds to your score when clicked.

Build steps

  1. Download the sprite starter with the green button under the chapter title on the MyHighschool page, then open it in Scratch.
  2. Rename the project Tap Storm if needed — three Target sprites are on the stage.
  3. Make a variable score (For all sprites) from Variables.
  4. On Target, add when green flag clicked from Events, then hide from Looks and set score to 0 from Variables.
  5. Add go to x: (pick random -200 to 200) y: (pick random -150 to 150) from Motion, then show from Looks.
  6. Add a separate script: when this sprite clicked from Events.
  7. Under the click hat, add change score by 1 from Variables.
  8. Still in the click script, add play sound Pop from Sound (pick any short sound).
  9. After the sound, add another random go to block so the target teleports after each hit.
  10. Test: click the target five times and watch the score climb.

Save point

Target pops and score works. Click-test ten times, then save.

Part B - Add the 30-second timer and game end

Add a countdown timer so Tap Storm ends at zero — then show a final score and wait for green flag to play again.

Timer variable trick

A variable named time left can count down with repeat (30) from Control and wait (1) seconds. When it hits zero, hide the target and announce the final score.

Build steps

  1. Create variable time left (For all sprites) from Variables. Show both score and time left on the Stage.
  2. On the Target sprite (green-flag script), after setting score to 0, add set time left to 30.
  3. Add repeat (30) from Control. Inside put wait (1) seconds then change time left by (-1).
  4. After the repeat loop finishes, add hide from Looks so the target disappears when time is up.
  5. Add say Game Over! Score: (join score ) using Looks and Operators join to display the final score.
  6. Add stop all from Control at the very end so clicks do nothing after time expires.
  7. Optional polish: make the target shrink briefly on click with change size by (-10) then reset size on the next pop.
  8. Play a full 30-second round twice. Confirm the timer reaches zero and the final score is correct.

Save point

Tap Storm runs a full timed round. Complete one 30-second game, then save.

Check yourself before the quiz

  1. Why do we use pick random for target positions?
  2. What happens in the script when when this sprite clicked runs?
  3. How does the repeat (30) loop create a 30-second game?
  4. Why call stop all after time runs out?

Confirm action