instance_deactivate_all(notme);
Argument | Description |
---|---|
notme | Whether to keep the calling instance activated (true) or not (false). |
Returns: N/A
This function will deactivate all instances that are in
the room at the moment that the code is run. This may include the
instance running the code if the "notme" flag is set to
false, but normally you would want that instance to be
active, in which case the "notme" flag should be set to
true.
NOTE: If you deactivate an instance on room start (ie:from the room creation code, or from an instance create event of an instance within the room) all instances that are placed within the room from the room editor will still run their create event before being deactivated.
WARNING: Deactivating instances that have physics enabled will NOT stop their fixtures from interacting within the physics simulation. For that you should set their phy_active variable to true or false as you activate/deactivate the instances.
instance_deactivate_all(true);
instance_activate_region(view_xview[0] - 64, view_yview - 64,
view_wview[0] + 128, view_hview + 128, false, false);
The above code deactivates all instances except the one that is running the code and then activates a region within the room.