Game Development Reference
In-Depth Information
Creating a global variable
Right-click on the event sheet and you can add a global variable. Go ahead and click on
Add global variable
.
As you can see in the preceding screenshot, there are four fields. You can name your vari-
able something memorable and that makes sense. Naming your variable appropriately will
make the development process much smoother. Variable names such as
score
,
number-
OfShots
, and
powerUpLevel
are recommended. You cannot have spaces in your vari-
ables—the computer will not allow you to have spaces.