instance_activate_object

Activates all instances of a given object in the room, or a particular instance if you provide an id.

Syntax:

instance_activate_object(obj);


Argument Description
obj The object or instance to activate (the keyword all can also be used).


Returns: N/A


Description

With this function you can activate a single instance or all instances of a specific object from all those that have been deactivated previously.


Example:

instance_activate_all();
instance_deactivate_region(view_xview[0] - 64, view_yview - 64, view_wview[0] + 128, view_hview + 128, false, false);
instance_activate_object(obj_Lights);

The above code activates all instances within the room and then deactivates those that are outside of the limits of the current view, except for the object "obj_Lights" which are re-activated again at the end.


Back: Deactivating Instances
Next: instance_activate_region
© Copyright YoYo Games Ltd. 2018 All Rights Reserved