Game Development Reference
In-Depth Information
Instance variables
An instance variable is one that is local to the instance it is initialized in. This means that it
is not directly accessible in any other instance within your game and must have the instance
ID for it to be referenced from outside of the instance it is created in.
To initialize an instance variable, type its name, the equals sign (=), and then its value. The
value can be either a real or a string. If the value is a string, then the text must be enclosed
in quotation marks.
The following is a sample of two instance variables being initialized in GameMaker:
Once these variables have been initialized, they can be used in any event of the object.
Search WWH ::




Custom Search