• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Is there a way to know which instance triggered an async event?

I

IndirectY

Guest
async_load doesn't seem to contain any instance data
 

rytan451

Member
Depends on the async events. For networking events, sometimes there's no object that triggered the event. For dialogue events, you should be able to store the dialogue ID at a global scope, associate it with an instance ID (for example using a ds_map), and when the dialogue event occurs, you can determine which instance ID is associated with the dialogue ID.
 

knightshaft

Member
async_load doesn't seem to contain any instance data
Could you not just add a global variable and set its value when you trigger the async event. If you only want to know for debugging purposes you can use show_debug_message() instead of a variable
 
Top