TheMagician
Member
What is the current "best practice" way of handing the current
I need to save the
I guess the reason for that is that "functions in GameMaker are not closures" but that's where my dodgy superficial knowledge comes into play ...
self
-context over into a callback function to be called at a later point from a different instance / script?I need to save the
self
-context of a struct into a callback function so that it can later be called from a different script. Right now I'm simply writing self
in the callback function but obviously that fails as soon as the callback is executed from the other script because then self
refers to that script instead of the original struct that created the callback function.I guess the reason for that is that "functions in GameMaker are not closures" but that's where my dodgy superficial knowledge comes into play ...