Recently foung what it looks like a bug to me.
I wanted to make a struct update every frame using the layer events. With layer_script_end and layer_script_begin you can choose a script or function or method to run every time a layer is drawn.
The problem is that this "hapens?" multiple times per frame in different events so you should use event_type and event_number to check for example if you are in the step event.
This works quite good if you have had set the layer script for a global function. But when you do so with the method of a struct (ie: layer_script_begin(0, Input.Update())) when you call these variables on the method they get value 0 every time.
I attach a link to mega in order to download the .yyz so you can tell if this is a bug or a feature.
Please sign in to leave a comment.