Step 3: X-Wing Lose 2

Goal:


Now that the game can tell whether we have any lives left, we need to tell it what to do with that information.

We are going to create a broadcast message that will activate the “You Lose” sprite that we will code a bit later in this lesson.

Messages are a way for different sprites to talk to each other and for a sprite to be activated by multiple different events.

Steps:

  1. From Events, place a broadcast block.
  2. Click “message1” and select “New Message”.
  3. In the window that appears type “lose”.

Code:


Click to replay