in , , , , ,

Enumeration Finally Added To GameMaker Studio

A recent Early Access build has introduced C-style enumeration to GameMaker Studio, an overdue feature that will be welcomed by veteran coders. Enumerations consist of named integer constants called “members” or “enumerators”.

An example is shown below.


In the example, an enumeration with a set of 7 members is declared. The constant values of the members range from 1 to 7. The enumeration can then be referenced in the manner shown.

Learn more about enumeration »

A copy of the code used in the example can be found below. You can paste this directly into GameMaker.

enum DAY { //declare enum type
var example = DAY.thu;

show_message(string(example)); //output: 5

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

GIPHY App Key not set. Please check settings


  1. Seems rather useful, but it could be similarly accomplished by using constants. Still, I suppose for local scripts, it would be useful for increasing readability.

GameMaker Studio Ranks #35 On Develop’s Top 100 Tech List

GameMaker Summer Sale – Up To 50% Off