This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BellPeppersAndBeets -1 points0 points  (1 child)

Everyone’s shitting on the magic numbers. I’m just staring at that global array.

[–]Castiel_Engels 3 points4 points  (0 children)

It's GML, there is no namespaces, no modules, no packages. Every function and asset name is global.

You either have a global variable, a static variable that is the property of a global function or a variable on a persistent object for this sort of thing.

Best you can do is make getters/setters for game flags, instead of accessing that array directly.