Stage 7 tasks
Work through the steps in order. If something breaks, compare your blocks to the video.
Video 2 β Time 05:35Open at 05:35 β
How to use the videos (do this every stage):
You cannot watch the whole video and remember every step. Instead: watch ~30 seconds, pause, then build that section in Scratch. Repeat.
- Split your screen so you can see Scratch and the video at the same time.
- Windows: open Scratch and the worksheet/video, then press Windows key + Left Arrow to snap one app to the left. Click the other window to fill the right.
- If you want Scratch bigger: drag the divider so Scratch takes about 2/3 of the screen and the video takes 1/3.
Create and set health
- Variables β make health.
- On Main: set health to 100 and score to 0 when green flag clicked.
Win condition (timer reaches 0)
- In timer loop: if time remaining = 0 then switch backdrop survived, broadcast survived, stop this script.
Lose condition (health reaches 0)
- On Main: if health = 0 then broadcast dead and stop other scripts in this sprite.
Make Buddy deal damage
- On Buddy: if touching Main β change health by -1.
- Optional: add a tiny wait to avoid instant death.
Clones: swarms of enemies
- On Buddy: wait 3 seconds β create clone β go to random position.
- When I start as a clone: wait 3 seconds β create clone.
- Make sure clones also chase and deal damage.
Randomise enemy speed
- Replace move 7 steps with move pick random 3 to 7 steps.
Hide Buddy when dead/survived
- When I receive dead β hide
- When I receive survived β hide
- When I receive start β show
Quick check (it works ifβ¦)
- Health starts at 100 and goes down when enemies touch you.
- At 0 health you see the dead screen.
- At 0 time remaining you see the survived screen.
- Enemies multiply over time (clones).
Extension:
- Add a proper health bar sprite (challenge).
- Hide the health variable display so only the health bar shows.
Extra: Health Bar Tutorial
Watch on YouTube β
Scratch tips for this stage:
- If you die instantly, add a tiny wait 0.1 after taking damage (optional).
- Clones need their own script: when I start as a clone β otherwise they wonβt multiply properly.
- Randomise enemy speed with pick random so swarms donβt clump into one blob.