JAG
Member
Has anyone ever run into an issue where they call instance_deactivate_all(true), and it works sometimes but not others?
I have the debugger running. Ive set a breakpoint where Im calling the function in an object user_event. I then have set a breakpoint at the beginning of the Step event for the same object, which will run on the next frame (because user events are resolved after Step). Im then testing by triggering the user_event in my game, which stops at the break point, then pushing continue to hit the Step event -- I watch the "All Instances" tab to see whats happening with the objects in my room.
Here's the weird part:
SOMETIMES when I hit the second breakpoint only the calling object is listed in the Instances tab, which is correct. But more frequently the Instances tab shows ALL my objects -- which either means that they were never deactivated in the first place, or something between event_user and the next frame's Step event re-activated everything.
Ive checked my code and Im definitely not calling instance_activate_all anywhere in this room, and even if I were I would expect the behaviour to be consistent. Does anyone have any theories about what might be going on here??
Thanks!
I have the debugger running. Ive set a breakpoint where Im calling the function in an object user_event. I then have set a breakpoint at the beginning of the Step event for the same object, which will run on the next frame (because user events are resolved after Step). Im then testing by triggering the user_event in my game, which stops at the break point, then pushing continue to hit the Step event -- I watch the "All Instances" tab to see whats happening with the objects in my room.
Here's the weird part:
SOMETIMES when I hit the second breakpoint only the calling object is listed in the Instances tab, which is correct. But more frequently the Instances tab shows ALL my objects -- which either means that they were never deactivated in the first place, or something between event_user and the next frame's Step event re-activated everything.
Ive checked my code and Im definitely not calling instance_activate_all anywhere in this room, and even if I were I would expect the behaviour to be consistent. Does anyone have any theories about what might be going on here??
Thanks!