Unit 2 · Lesson 3

Test, Customize, and Play Together

  • Finish the Team Missions
  • 30 minutes
  • Advanced Scratch · Ages 8–11

Finish a cooperative game that treats both players consistently.

Prerequisite: Scratch Space Rescue Adventure. Complete Space Rescue Adventure before building for two players.

Downloads

3 files

Start with a blank Scratch project and extract the art ZIP. Follow each lesson’s upload, variable, message, custom-block and stack checklist. Save your own .sb3 after each target. Checkpoints are optional end-of-lesson comparisons; save before loading one. Allow extra short setup sessions.

Download art and sound

Start here: extract this artwork ZIP and use the lesson upload tables to create your own targets. Includes BUILD-FROM-BLANK.md, credits and licenses.

Download completed game

The finished cooperative Scratch game with two pilots, shared missions, meteor clones, and a team log.

Download lesson checkpoints

Six Scratch projects, one for the end of each 30-minute lesson, with opening and saving instructions.

Your goal

Test independent player state, shared mission rules, every ending and restart, then make one deliberate change and save a working two-player Scratch project.

Your build path · Lesson 6 of 6

Continue the game you built

Open your saved lesson 5 project. Keep its working code. If you need a recovery copy, save your own work first, then open the optional previous lesson checkpoint. It replaces the current project; it does not add sprites.

Work in short sessions. Asset setup and the first reset/controller scripts can take extra sessions in these larger games. Finish one target’s instructions, check it, and save before moving on. The current checkpoint is the end of this lesson, not the starting file.

1. Add only the new assets below

Download this game’s art and sound ZIP. Extract it first: double-click on Mac, use Extract All on Windows, or copy the ZIP’s contents into a normal folder in Chromebook Files. Upload the extracted image/audio files, not the ZIP or license documents.

No new artwork or sounds in this lesson. Keep the targets you already uploaded.

Do not upload one image twice just because two scripts use it. If two different targets use the same file (for example, Gem 1 and Gem 2), make the separately named sprites listed. Keep the downloaded license files with your project folder.

Layer order: after adding sprites, bring them to the front one at a time in this back-to-front order: Rescue Base → Meteor → Blue Pilot → Coral Pilot → Blue Crew → Coral Crew → Start / Restart → Next Mission. Select each named sprite, click a loose Looks → go to front layer block once, then remove that loose block. Keep hidden targets hidden. This keeps the rescue base or terrain behind the moving characters.

2. Make your variables and set their values

A variable is a named box that holds a value. For example, Lives holds how many chances you have left.

Keep variables you made in earlier lessons. Only make the new ones listed here. Inputs for custom blocks are different: you will make those in step 3.

No new variables or lists today.

Choose which counters players can see. In Variables, tick the box beside Mission, Goal, TeamRescued, TotalRescued, BlueRescued, BlueLives, CoralRescued, CoralLives, TimeLeft. Untick the other variable and list boxes. This only shows or hides the counter; it does not change its value. Drag visible counters away from the play area.

3. Name messages and custom blocks before their calls

No new broadcast messages today; keep the messages from earlier lessons.

No new custom block definitions today. Update existing definitions only if the list below says to.

4. Build this lesson’s stacks in small passes

Keep your existing working stacks. Update their contents where marked; do not add a second copy of the same hat or forever loop. The colored guide below contains every real checkpoint block, including unchanged stacks. A rose My Blocks call uses the named block; “define” is a separate definition stack.

Build custom block definitions first, then finite reset receivers, then the green-flag/controller and movement loops. Finish the listed stacks before testing the whole game. Indented rows go inside the enclosing Control block. Use a green and/or block for combined questions; nest another and/or if there are three tests. Reset receivers used by broadcast-and-wait must finish — do not put a forever loop in them.

No new required stacks in this lesson. Test your game, save a new version and make one deliberate improvement.

39 unchanged stacks stay in your project. Save after each completed target. The optional lesson 6 checkpoint is a comparison of the expected end; loading it replaces your own work.

5. Compare the Scratch reference, then run the lesson’s test

Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
  1. Click: Click the green flag to test.
  2. Click: Use Start / Restart for a fresh game.
Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.

Targets at this checkpoint: Stage, Blue Pilot, Coral Pilot, Blue Crew, Coral Crew, Rescue Base, Meteor, Start / Restart, Next Mission. Later targets are introduced by their own upload tables. If the artwork is right but the game does nothing, inspect the event hats, selected target, broadcasts and current GameState. If it behaves differently, compare the same numbered checkpoint, not the finished preview’s later features.

Give the game a real two-person test

The final checkpoint contains the same complete systems. Your job is to test the interaction between two pilots, make one intentional change, and explain your design. A game that works for Blue Pilot alone has not yet passed its cooperative test.

Use the website’s finished game to understand the target behavior. Its preview always runs the completed project, not your edited checkpoint. Build and test your own downloaded .sb3 in Scratch. Save your current work before loading any supplied file.

Plan your 30 minutes

Spend 5 minutes watching and tracing, 15 building, 5 testing and explaining, and 5 saving or making one small change. Pause longer when a new idea needs practice.

Run a two-player test plan

  1. Start fresh. Check Mission one, Goal two, TimeLeft 60, three lives for each pilot, zero passengers, zero contributions, zero team and adventure rescues, and an empty MissionLog. Test WASD, all four arrows, diagonal motion, and every stage edge.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Stage's Code area: delete all of [MissionLog].
    1. Add: Build this Stage code stack.
    Stage · when I receive [new game].
  2. Pick up Blue Crew and Coral Crew before either pilot returns. Check that each passenger flag changes independently. Deliver one passenger and confirm only the matching contribution counter increases, while TeamRescued and TotalRescued each gain one.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Blue Crew's Code area: if <<GameState = playing> and <<BlueRescued < Mission> and <<BlueCarrying = 0> and <touching [Blue Pilot]?>>>> then.
    1. Add: Build this Blue Crew code stack.
    Blue Crew · when I receive [play mission]. Detail 2.
    Actual Scratch close-up of Rescue Base's Code area: change [TeamRescued] by (1); change [TotalRescued] by (1); if <<TeamRescued = Goal> and <<BlueRescued = Mission> and <CoralRescued = Mission>>> then / else; if <<GameState = playing> and <<CoralCarrying = 1> and <touching [Coral Pilot]?>>> then; set [CoralCarrying] to (0); change [CoralRescued] by (1); change [TeamRescued] by (1); change [TotalRescued] by (1).
    1. Add: Build this Rescue Base code stack.
    Rescue Base · when I receive [play mission]. Detail 1.
  3. Let one pilot fill their own quota while the other waits. The matching crew must stay hidden and the mission must remain open for the other pilot. Wait at Rescue Base empty and check there are no extra points. Repeat the quota rule in a later mission.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Blue Crew's Code area: if <<GameState = playing> and <<BlueRescued < Mission> and <<BlueCarrying = 0> and <touching [Blue Pilot]?>>>> then.
    1. Add: Build this Blue Crew code stack.
    Blue Crew · when I receive [play mission]. Detail 2.
    Actual Scratch close-up of Stage's Code area: if <GameState = between> then; add [join [Mission ] [join [Mission] [join [: Blue ] [join [BlueRescued] [join [ + Coral ] [CoralRescued]]]]]] to [MissionLog]; set [GameState] to (won); broadcast [end mission] and wait; show list [MissionLog].
    1. Add: Build this Stage code stack.
    Stage · when I receive [mission clear]. Detail 1.
  4. Test a hit on each pilot. Only that pilot loses a life, returns to its own side, and gets one second of protection. Its passenger stays aboard. A protected Blue Pilot must not protect Coral Pilot. Either pilot reaching zero ends the team run.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Blue Pilot's Code area: when I receive [blue hit]; go to x: (-55) y: (-125); start sound [Hit].
    1. Add: Build this Blue Pilot message stack.
    Blue Pilot · when I receive [blue hit].
  5. Test a time-out with lives remaining. At every ending, both ships, damage, scoring, and the clock must freeze. Restart twice quickly during play, after a loss, and after a win. Old clocks and clones must not survive.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Stage's Code area: set [GameState] to (resetting); broadcast [reset world] and wait; set [GameState] to (playing); repeat until <not <GameState = playing>>; wait (1) seconds; if <GameState = playing> then; change [TimeLeft] by (-1); if <TimeLeft = 0> then; set [GameState] to (lost); broadcast [end mission].
    1. Add: Build this Stage code stack.
    Stage · when I receive [prepare mission].
    Actual Scratch close-up of Stage's Code area: if <GameState = lost> then; show list [MissionLog].
    1. Add: Build this Stage code stack.
    Stage · when I receive [end mission].
  6. Play all three missions. Goals are two, four, and six; meteor counts are two, three, and four. Next Mission preserves both lives, TotalRescued, and earlier log entries. A full restart resets them. Each pilot rescues one, then two, then three crew members. The win has twelve total rescues and three log entries.

    Actual Scratch Stage for Test and Customize Space Rescue Duo after starting its lesson checkpoint.
    1. Click: Click the green flag to test.
    2. Click: Use Start / Restart for a fresh game.
    Actual Scratch · Test and Customize Space Rescue Duo — the project view after clicking the green flag. Use the test steps to check movement and game rules.
    Actual Scratch close-up of Stage's Code area: when I receive [next mission]; if <GameState = between> then; set [GameState] to (resetting); change [Mission] by (1); broadcast [prepare mission].
    1. Add: Build this Stage message stack.
    Stage · when I receive [next mission].
    Actual Scratch close-up of Stage's Code area: if <GameState = between> then; add [join [Mission ] [join [Mission] [join [: Blue ] [join [BlueRescued] [join [ + Coral ] [CoralRescued]]]]]] to [MissionLog]; set [GameState] to (won); broadcast [end mission] and wait; show list [MissionLog].
    1. Add: Build this Stage code stack.
    Stage · when I receive [mission clear]. Detail 1.

Make one useful change

Give the pilots new labeled costumes, change a feedback sound, or decorate the base. Preserve a clear visual difference between the two roles. Keep a working copy before editing. Changing a costume’s visible shape can change contact, so repeat pickup and meteor tests afterward. Keep the course’s rules unchanged while comparing your project with its guide.

Save and explain

Choose File, then Save to your computer, and use a clear .sb3 name. A Scratch account is optional for local saving. Reopen that saved file and test it with a partner. Explain which values belong to each pilot, which belong to the mission, and which survive to the next mission. Ask an adult before sharing publicly and leave personal information out.

When something goes wrong

Describe the exact keys, values, and state before the problem. Change one rule, retest both pilots, and save Duo Lesson 06 when your explanation matches the game.

Build with blocks · Lesson 6

See the blocks. Try the finished game.

Build these blocks in Scratch. This guide is read-only.

Your lesson’s block guide

Choose the matching sprite in Scratch, then build its stack from top to bottom.

Indented rows fit inside the block above. else marks the second slot of one if/else block.

Each pilot keeps separate carrying, lives, and delivery values. Both pilots must finish their own rescue quota: 1, then 2, then 3 matching crew members. MissionLog is a shared list for the current team adventure.

StageStage: define prepare team mission
  1. My Blocksdefine prepare team mission
  2. Variablesset [Goal] to (Mission + Mission)
  3. Variablesset [TeamRescued] to (0)
  4. Variablesset [BlueCarrying] to (0)
  5. Variablesset [BlueRescued] to (0)
  6. Variablesset [BlueHurtUntil] to (0)
  7. Variablesset [CoralCarrying] to (0)
  8. Variablesset [CoralRescued] to (0)
  9. Variablesset [CoralHurtUntil] to (0)
  10. Variablesset [TimeLeft] to (60)
  11. Variableshide list [MissionLog]
  12. Controlif <Mission = 1> then
  13. Looksswitch backdrop to [Mission 1]
  14. elseSecond slot of the same if/else block
    Controlif <Mission = 2> then
  15. Looksswitch backdrop to [Mission 2]
  16. elseSecond slot of the same if/else block
    Looksswitch backdrop to [Mission 3]
StageStage: when green flag clicked
  1. Eventswhen green flag clicked
  2. Eventsbroadcast [new game]
StageStage: when I receive [new game]
  1. Eventswhen I receive [new game]
  2. Controlstop [other scripts in sprite]
  3. Variablesset [GameState] to (resetting)
  4. Variablesset [Mission] to (1)
  5. Variablesset [TotalRescued] to (0)
  6. Variablesset [BlueLives] to (3)
  7. Variablesset [CoralLives] to (3)
  8. Sensingreset timer
  9. Variablesdelete all of [MissionLog]
  10. Eventsbroadcast [prepare mission]
StageStage: when I receive [prepare mission]
  1. Eventswhen I receive [prepare mission]
  2. Controlstop [other scripts in sprite]
  3. Variablesset [GameState] to (resetting)
  4. Eventsbroadcast [reset world] and wait
  5. My Blockscall prepare team mission
  6. Variablesset [GameState] to (playing)
  7. Eventsbroadcast [play mission]
  8. Controlrepeat until <not <GameState = playing>>
  9. Controlwait (1) seconds
  10. Controlif <GameState = playing> then
  11. Variableschange [TimeLeft] by (-1)
  12. Controlif <TimeLeft = 0> then
  13. Variablesset [GameState] to (lost)
  14. Eventsbroadcast [end mission]
StageStage: when I receive [mission clear]
  1. Eventswhen I receive [mission clear]
  2. Controlif <GameState = between> then
  3. Variablesadd [join [Mission ] [join [Mission] [join [: Blue ] [join [BlueRescued] [join [ + Coral ] [CoralRescued]]]]]] to [MissionLog]
  4. Controlif <Mission = 3> then
  5. Variablesset [GameState] to (won)
  6. Looksswitch backdrop to [Adventure complete]
  7. elseSecond slot of the same if/else block
    Looksswitch backdrop to [Mission complete]
  8. Eventsbroadcast [end mission] and wait
  9. Variablesshow list [MissionLog]
StageStage: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlif <GameState = lost> then
  3. Controlif <<BlueLives > 0> and <CoralLives > 0>> then
  4. Looksswitch backdrop to [Time is up]
  5. elseSecond slot of the same if/else block
    Looksswitch backdrop to [Out of lives]
  6. Variablesshow list [MissionLog]
StageStage: when I receive [next mission]
  1. Eventswhen I receive [next mission]
  2. Controlif <GameState = between> then
  3. Variablesset [GameState] to (resetting)
  4. Variableschange [Mission] by (1)
  5. Eventsbroadcast [prepare mission]
Blue PilotBlue Pilot: define move ship (dx) (dy)
  1. My Blocksdefine move ship (dx) (dy)
  2. Motionchange x by (dx)
  3. Motionchange y by (dy)
  4. Controlif <x position > 210> then
  5. Motionset x to (210)
  6. Controlif <x position < -210> then
  7. Motionset x to (-210)
  8. Controlif <y position > 40> then
  9. Motionset y to (40)
  10. Controlif <y position < -145> then
  11. Motionset y to (-145)
Blue PilotBlue Pilot: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Lookssay []
  5. Looksclear graphic effects
  6. Motiongo to x: (-55) y: (-125)
Blue PilotBlue Pilot: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Looksshow
  3. Controlforever
  4. Controlif <GameState = playing> then
  5. Controlif <key [d] pressed?> then
  6. My Blockscall move ship (7) (0)
  7. Controlif <key [a] pressed?> then
  8. My Blockscall move ship (-7) (0)
  9. Controlif <key [w] pressed?> then
  10. My Blockscall move ship (0) (7)
  11. Controlif <key [s] pressed?> then
  12. My Blockscall move ship (0) (-7)
  13. Controlif <BlueCarrying = 1> then
  14. Lookssay [Crew aboard!]
  15. elseSecond slot of the same if/else block
    Lookssay []
  16. Controlif <timer < BlueHurtUntil> then
  17. Looksset [ghost] effect to (45)
  18. elseSecond slot of the same if/else block
    Looksclear graphic effects
Blue PilotBlue Pilot: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Lookssay []
  5. Looksclear graphic effects
Blue PilotBlue Pilot: when I receive [blue hit]
  1. Eventswhen I receive [blue hit]
  2. Motiongo to x: (-55) y: (-125)
  3. Soundstart sound [Hit]
Coral PilotCoral Pilot: define move ship (dx) (dy)
  1. My Blocksdefine move ship (dx) (dy)
  2. Motionchange x by (dx)
  3. Motionchange y by (dy)
  4. Controlif <x position > 210> then
  5. Motionset x to (210)
  6. Controlif <x position < -210> then
  7. Motionset x to (-210)
  8. Controlif <y position > 40> then
  9. Motionset y to (40)
  10. Controlif <y position < -145> then
  11. Motionset y to (-145)
Coral PilotCoral Pilot: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Lookssay []
  5. Looksclear graphic effects
  6. Motiongo to x: (55) y: (-125)
Coral PilotCoral Pilot: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Looksshow
  3. Controlforever
  4. Controlif <GameState = playing> then
  5. Controlif <key [right arrow] pressed?> then
  6. My Blockscall move ship (7) (0)
  7. Controlif <key [left arrow] pressed?> then
  8. My Blockscall move ship (-7) (0)
  9. Controlif <key [up arrow] pressed?> then
  10. My Blockscall move ship (0) (7)
  11. Controlif <key [down arrow] pressed?> then
  12. My Blockscall move ship (0) (-7)
  13. Controlif <CoralCarrying = 1> then
  14. Lookssay [Crew aboard!]
  15. elseSecond slot of the same if/else block
    Lookssay []
  16. Controlif <timer < CoralHurtUntil> then
  17. Looksset [ghost] effect to (45)
  18. elseSecond slot of the same if/else block
    Looksclear graphic effects
Coral PilotCoral Pilot: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Lookssay []
  5. Looksclear graphic effects
Coral PilotCoral Pilot: when I receive [coral hit]
  1. Eventswhen I receive [coral hit]
  2. Motiongo to x: (55) y: (-125)
  3. Soundstart sound [Hit]
Blue CrewBlue Crew: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Motiongo to x: (pick random (-180) to (-40)) y: (pick random (-25) to (0))
Blue CrewBlue Crew: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Looksshow
  3. Controlforever
  4. Controlif <<GameState = playing> and <<BlueRescued < Mission> and <<BlueCarrying = 0> and <touching [Blue Pilot]?>>>> then
  5. Variablesset [BlueCarrying] to (1)
  6. Lookshide
  7. Soundstart sound [Rescue]
Blue CrewBlue Crew: when I receive [blue delivered]
  1. Eventswhen I receive [blue delivered]
  2. Controlif <<GameState = playing> and <BlueRescued < Mission>> then
  3. Motiongo to x: (pick random (-180) to (-40)) y: (pick random (-25) to (0))
  4. Looksshow
Blue CrewBlue Crew: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
Coral CrewCoral Crew: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Motiongo to x: (pick random (40) to (180)) y: (pick random (-25) to (0))
Coral CrewCoral Crew: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Looksshow
  3. Controlforever
  4. Controlif <<GameState = playing> and <<CoralRescued < Mission> and <<CoralCarrying = 0> and <touching [Coral Pilot]?>>>> then
  5. Variablesset [CoralCarrying] to (1)
  6. Lookshide
  7. Soundstart sound [Rescue]
Coral CrewCoral Crew: when I receive [coral delivered]
  1. Eventswhen I receive [coral delivered]
  2. Controlif <<GameState = playing> and <CoralRescued < Mission>> then
  3. Motiongo to x: (pick random (40) to (180)) y: (pick random (-25) to (0))
  4. Looksshow
Coral CrewCoral Crew: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
Rescue BaseRescue Base: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
  4. Motiongo to x: (0) y: (-137)
Rescue BaseRescue Base: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Looksshow
  3. Controlforever
  4. Controlif <<GameState = playing> and <<BlueCarrying = 1> and <touching [Blue Pilot]?>>> then
  5. Variablesset [BlueCarrying] to (0)
  6. Variableschange [BlueRescued] by (1)
  7. Variableschange [TeamRescued] by (1)
  8. Variableschange [TotalRescued] by (1)
  9. Controlif <<TeamRescued = Goal> and <<BlueRescued = Mission> and <CoralRescued = Mission>>> then
  10. Variablesset [GameState] to (between)
  11. Eventsbroadcast [mission clear]
  12. elseSecond slot of the same if/else block
    Eventsbroadcast [blue delivered]
  13. Soundstart sound [Rescue]
  14. Controlif <<GameState = playing> and <<CoralCarrying = 1> and <touching [Coral Pilot]?>>> then
  15. Variablesset [CoralCarrying] to (0)
  16. Variableschange [CoralRescued] by (1)
  17. Variableschange [TeamRescued] by (1)
  18. Variableschange [TotalRescued] by (1)
  19. Controlif <<TeamRescued = Goal> and <<BlueRescued = Mission> and <CoralRescued = Mission>>> then
  20. Variablesset [GameState] to (between)
  21. Eventsbroadcast [mission clear]
  22. elseSecond slot of the same if/else block
    Eventsbroadcast [coral delivered]
  23. Soundstart sound [Rescue]
Rescue BaseRescue Base: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
MeteorMeteor: define respawn (speed)
  1. My Blocksdefine respawn (speed)
  2. Variablesset [FallSpeed · this sprite only] to (speed)
  3. Motiongo to x: (pick random (-205) to (205)) y: (180)
  4. Looksshow
MeteorMeteor: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Lookshide
  3. Controlstop [other scripts in sprite]
  4. Controldelete this clone
MeteorMeteor: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Lookshide
  3. Controlstop [other scripts in sprite]
  4. Controldelete this clone
MeteorMeteor: when I receive [play mission]
  1. Eventswhen I receive [play mission]
  2. Lookshide
  3. Controlrepeat (Mission + 1)
  4. Controlcreate clone of [myself]
MeteorMeteor: when I start as a clone
  1. Controlwhen I start as a clone
  2. My Blockscall respawn (Mission + 2)
  3. Controlforever
  4. Controlif <GameState = playing> then
  5. Motionchange y by (0 - FallSpeed)
  6. Controlif <<GameState = playing> and <<touching [Blue Pilot]?> and <timer > BlueHurtUntil>>> then
  7. Variablesset [BlueHurtUntil] to (timer + 1)
  8. Variableschange [BlueLives] by (-1)
  9. My Blockscall respawn (Mission + 2)
  10. Eventsbroadcast [blue hit]
  11. Controlif <BlueLives = 0> then
  12. Variablesset [GameState] to (lost)
  13. Eventsbroadcast [end mission]
  14. Controlif <<GameState = playing> and <<touching [Coral Pilot]?> and <timer > CoralHurtUntil>>> then
  15. Variablesset [CoralHurtUntil] to (timer + 1)
  16. Variableschange [CoralLives] by (-1)
  17. My Blockscall respawn (Mission + 2)
  18. Eventsbroadcast [coral hit]
  19. Controlif <CoralLives = 0> then
  20. Variablesset [GameState] to (lost)
  21. Eventsbroadcast [end mission]
  22. Controlif <<GameState = playing> and <y position < -175>> then
  23. My Blockscall respawn (Mission + 2)
Start / RestartStart / Restart: when green flag clicked
  1. Eventswhen green flag clicked
  2. Motiongo to x: (155) y: (150)
  3. Looksshow
Start / RestartStart / Restart: when this sprite clicked
  1. Eventswhen this sprite clicked
  2. Eventsbroadcast [new game]
Next MissionNext Mission: when green flag clicked
  1. Eventswhen green flag clicked
  2. Motiongo to x: (145) y: (-135)
  3. Lookshide
Next MissionNext Mission: when I receive [reset world]
  1. Eventswhen I receive [reset world]
  2. Controlstop [other scripts in sprite]
  3. Lookshide
Next MissionNext Mission: when I receive [end mission]
  1. Eventswhen I receive [end mission]
  2. Controlif <GameState = between> then
  3. Looksshow
  4. elseSecond slot of the same if/else block
    Lookshide
Next MissionNext Mission: when this sprite clicked
  1. Eventswhen this sprite clicked
  2. Controlif <GameState = between> then
  3. Eventsbroadcast [next mission]
Download lesson 6 checkpoint

Save your current Scratch project first. Then choose File → Load from your computer and select this .sb3 file.

Open the Scratch editor ↗

Opening the editor does not load the download automatically.

Finished game preview

This is the completed game, including features from later lessons. It does not run this lesson’s checkpoint.

Choose the green flag, then use W, A, S, D for Blue Pilot and all four arrow keys for Coral Pilot inside the Scratch player. Open your checkpoint in Scratch to test the blocks for this lesson.

Open the finished game in a new tab ↗
END OF LESSON

Ready for the next step?

Return here anytime to review.

Finished project

Space Rescue Duo

Two players share one keyboard: Blue Pilot uses WASD and Coral Pilot uses the arrow keys. Rescue your matching crew, bring them to base, and complete three team missions. Both pilots must contribute while managing their own lives.

Compare this working example with your own project. It opens in a new tab.

Play the finished two-player game
Comments

Lesson discussion

Ask a question or help a classmate. Mr. S can reply here.

Loading discussion…