Home | Customize | Blog | Extras | Log In | Info
Manual | D&D icons | GML Parser | Archive | Iso City
Username: Password:  
About | Features | Directory | Banners | Contact

Designing Games with GameMaker
Designing Games with GameMaker

Functions

A function has the form of a function name, followed by zero or more arguments between brackets, separated by commas.

<function>(<arg1>,<arg2>,...)

There are two types of functions. First of all, there is a huge collection of built-in functions, to control all aspects of your game. Secondly, any script you define in your game can be used as a function.

Note that for a function without arguments you still need to use the brackets. Some functions return values and can be used in expressions. Others simply execute commands.

Note that it is impossible to use a function as the lefthand side of an assignment. For example, you cannot write instance_nearest(x,y,obj).speed = 0. Instead you must write (instance_nearest(x,y,obj)).speed = 0.

Search Search


Alternative versions Alternative versions

You can also read this manual on one single long page (± 1.5 mb)

Also available in: Dutch French German

ZIP Download helpfile

Advertisement Advertisement

GameMaker Manual