instance_activate_all


Syntax:

instance_activate_all();


Returns: N/A


Description

With this function you can tell GameMaker Studio 2 to activate all instances that have been previously deactivated in a room.


Example:

instance_activate_all();
var _vx = camera_get_view_x(view_camera[0]);
var _vy = camera_get_view_y(view_camera[0]);
var _vw = camera_get_view_width(view_camera[0]);
var _vh = camera_get_view_height(view_camera[0]);
instance_deactivate_region(_vx - 64, _vy - 64, _vw + 128, _vh + 128, false, false);

The above code activates all instances within the room and then deactivates those that are 64px outside of the limits of the current camera view.