Step 1: Setting Up Our Variables

Goal:


Let’s start by making three variables. Variables are words or phrases we can use to represent bits of information like numbers. We do this so the information stays consistent through the program and is easy to locate.

The “Blaster Shots:” variable will be used to keep track of how many lasers are left to use.

The “Score:” variable will be used to keep track of the current score in the game.

The “High Score:” variable will be used to keep track of the current best score.

Steps:

  1. From Variables click on Make a Variable
  2. Name this variable “Blaster Shots:
  3. Repeat these steps to make two more variables called “Score:” and “High Score:

Make sure all variables are checked in the Variables tab!

Code:


Click to replay