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.