User Tools

Site Tools


Set Group Light Color

Changes the color of the light attached to any entities in the specified group over a duration of time (with the assumption that each entity is a light source).


set_group_light_color(group_name, color, duration)
group_nameGroup of entities that will have their light color changed.StringYes
colorNew color for the lights.ColorYes
durationFade duration from their current color to the new color.NumberNo

If you'd like to instantly toggle the entity group's lights on or off instead of changing their color, see the related Set Group Light Enabled function.


set_group_light_color("torches", color[255, 0, 0], 1);

Results: All entities in the “torches” group will have the color of their light change to red over a duration of one second.

Use the Set Group Light Color function to dim/brighten all lamps in a room or to emulate multi-color lights (like an LED on an electronic device).

Editor Node:

Visual Demo:

set_group_light_color.txt · Last modified: 2021/04/21 18:51 by justin