User Tools

Site Tools


set_group_light_enabled

This is an old revision of the document!


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).

Signature:

set_group_light_enabled(group_name, enabled)
ArgumentDescriptionTypeRequired
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.

Example:

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.1588013753.txt.gz · Last modified: 2020/04/27 11:55 by justin