User Tools

Site Tools


set_group_light_color

This is an old revision of the document!


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

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.

Example:

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.1506453257.txt.gz · Last modified: 2017/09/26 12:14 by justin