======Set Group Light Enabled====== ---- Enables or disables the light attached to any [[entity|entities]] in the specified [[groups|group]] (with the assumption that each [[entity]] is a light source). ====Signature:==== set_group_light_enabled(group_name, enabled) ^Argument^Description^Type^Required^ |group_name|[[groups|Group]] of [[entity|entities]] that will have their light enabled or disabled.|[[String]]|Yes| |enabled|Determines the state of the lights (on or off).|[[Boolean]]|Yes| If you'd like to change the color of the [[entity]] [[groups|group's]] lights instead of toggling them on or off, see the related [[Set Group Light Color]] function. ====Example:==== set_group_light_enabled("torches", true); //Results:// All [[entity|entities]] in the "torches" [[groups|group]] will have their lights enabled (i.e. they will be turned on and cast light). Use the **Set Group Light Enabled** function to toggle a room's lights on and off when the player interacts with a switch or button. ====Editor Node:==== {{:wiki:set_group_light_enabled_node.png?nolink|}} ====Visual Demo:==== {{:wiki:set_group_light_enabled_demo.gif?nolink|}} ~~NOTOC~~