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 Game Maker
Designing Games with Game Maker

Constants

Under this tab you can define global constants that can be used in all scripts and pieces of code, or as values for actions. Each constant has a name and a value. Names should follow the same rules as variables, that is, they must start with a letter or underscore symbol and further consist of letters, digits or underscore symbols. You are though strongly recommended to make all your constants easily distinguishable. A usual convention is to use only capital letters and underscores.

A value of a constant should be a constant expression. That is, it is either a constant number or a string (with quotes around it) or it is an expression. The expression is evaluated before anything else happens in the game. So it for example cannot reference the current room, instances, or scripts. But it can contain the built-in constants and the names of resources.

You can append a constant at the end of the list using the button Append and delete it using Delete. You can also insert a constant above the current selected constant. You can change a constant name or value by clicking on it. There are also buttons to clear all constants, to move them up or down in the list, and to sort them by name.

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

Game Maker Manual