Constant

A constant in a program is a variable that never changes while the program is running, hence the name Constants.

Uses
Constants are often used to replace numbers with words. For example, in a program, weather adjustments are controlled by specific numbers, 1 for rain, 2 for snow, 3 for nothing. Rather than having ones, twos and threes laying around in the code, the user can replace them with a variable constant that will never change.

Constants in Game Maker
Constants in Game Maker 8.0 and later versions and Game Maker 7 differ. This article deals only with constants in Game Maker 8.0 and Game Maker 8.1.

Creating a Constant
Click on Resources and then Constants, and it will then bring up this table. A constant can now be created. Constants can either be text or a number, but must be formatted correctly. Number constants are everyday numbers. String constants on the other hand, need to be surrounded by quotes.