Functions and variables in GML

Game Maker 8

Functions and variables in GML

GML contains a large number of built-in functions and variables. With these you can control any part of the game. For all actions there are corresponding functions so you actually don't need to use any actions if you prefer using code. But there are many more functions and variables that control aspects of the game that cannot be used with actions only. So if you want to make advanced games you are strongly advised to read through the following chapters to get an overview of all that is possible. Please note that these variables and functions can also be used when providing values for actions. So even if you don't plan on using code or writing scripts, you will still benefit from this information.

The following convention is used below. Variable names marked with a * are read-only, that is, their value cannot be changed. Variable names with [0..n] after them are arrays. The range of possible indices is given.