instance_activate_all();
Returns: N/A
With this function you can tell GameMaker: Studio to
activate all instances that have been previously deactivated in a
room.
instance_activate_all();
instance_deactivate_region(view_xview[0] - 64, view_yview - 64,
view_wview[0] + 128, view_hview + 128, false, false);
The above code activates all instances within the room and then deactivates those that are outside of the limits of the current view.