Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I am currently working on supporting static variables, but there is a range of problems:

  • There is not a way to get/set static variables like you usually would with variable_ functions, so I can’t automatically pick up the existing static variables and they’ll be re-initialized.
  • Constructors are worse - if you change a static variable in the constructor itself, the change will be reflected across all instances of the constructor. There is not a way to do that “dynamically” in GML, but people can probably do without it.
  • Constructor inheritance is much worse - technically inheritance just calls the parent constructor in the beginning of child constructor, but this will not grant you static variables from it - you have to use new on it, so a “live” constructor would have to construct the nearest non-live parent and add functions on top of it.

Awesome! Thanks for the reply.

As long as I'm not losing my mind, and it is indeed not yet supported. Makes sense, all good. I can definitely imagine all the problems that would come with that, GMLive is a complicated beast. Good luck with that, haha.