A variable is a text representation or information.
Local Variable
These will only be available inside the current function.
Global Variable
In order to declare global variables, they need to be attached to something like self or level.
Arrays
An array can be declared the following:
Function Variables
This stores the function named doSomething into the variable functionVariable.
Local Variable
These will only be available inside the current function.
- Code:
modded = 1
myName = "Bully@WiiPlaza"
Global Variable
In order to declare global variables, they need to be attached to something like self or level.
- Code:
level.modded = 1
self.name = "Bully@WiiPlaza"
Arrays
An array can be declared the following:
- Code:
position = (x, y, z);
- Code:
newArray = [];
- Code:
myArray[5] = [];
- Code:
myArray.size
- Code:
firstWeaponToken = weaponTokens[0];
Function Variables
- Code:
functionVariable = ::doSomething;
This stores the function named doSomething into the variable functionVariable.
- Code:
[[functionVariable]](arguments1, argument2, ...);