Step 3: Set Our Variables

Goal:


We now need to set up our variables at the beginning of the game.

Steps:

  1. Click on the sprite of our ship.
  2. From Events, place a when flag clicked block.
  3. From Variables, place a set block.
  4. Change the variable to Lives and set the number to 3.
  5. From Variables, place a set block.
  6. Change the variable to Points and set the number to 0.
  7. From Variables, place a set block.
  8. Change the variable to Fire_Rate and set the number to 0.3.

Code: