Step 10: Defeat the Star Destroyer

Goal:


With all of our hit animation and lives lost code done, we need to add a way to actually win the game. What we are going to do is add a way for the Star Destroyer to trigger a win screen.

Steps:

  1. In the Star Destroyer sprite, find the IF statement that deals with what happens if the boss is out of life.
  2. Delete the delete this clone block.
  3. From Looks, place a hide block inside of the IF statement.
  4. From Events, place a broadcast block.
  5. Select “New message” and type “Win” into the window.
  6. Make sure the broadcast block is set to Win.

Code: