Hardware Reference
In-Depth Information
Making the variables
Now that we know what we need, we can start by creating our variables:
1. Click on the
Variables
button, and then click on
Make a variable
. It will ask you
for a name, and display two options:
For all sprites
and
For this sprite only
. En-
sure that you click on
For all sprites
.
2. Our first variable will be named
score
. Type this and click on
OK
. The
score
variable will be used to keep track of how many walls you have passed. It will go
up by one each time.
Now, make three more variables with the following names:
•
scroll
: This will be used to keep track of where the floor is, since it will be
moving
•
time
: This will keep track of how many seconds have passed since you started the
game
•
pipeX
: This will keep track of where the pipe is across the screen
