User Tools

Site Tools


Set Group Light Enabled

Enables or disables the light attached to any entities in the specified group (with the assumption that each entity is a light source).


set_group_light_enabled(group_name, enabled)
group_nameGroup of entities that will have their light enabled or disabled.StringYes
enabledDetermines the state of the lights (on or off).BooleanYes

If you'd like to change the color of the entity group's lights instead of toggling them on or off, see the related Set Group Light Color function.


set_group_light_enabled("torches", true)

Results: All entities in the “torches” 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:

Visual Demo:

set_group_light_enabled.txt · Last modified: 2018/03/16 09:49 by justin