Step 12: Winning the Game 1

Goal:


We now have all the code for all of our enemies and our player, but now we need to code how to actually win.

Most games have some way to win and get to the end. We are going to have a “YOU WIN” text appear on the screen and stop the game.

Let’s start with how the text should behave when the game first starts.

Steps:

  1. From the sprite menu, click the sprite called You Win.
  2. From Events, place a when green flag clicked block.
  3. From Looks, place a hide block.

Code: