User Tools

Site Tools


set_entity_light_color

This is an old revision of the document!


Set Entity Light Color


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

set_entity_light_color(entity, color, duration)
ArgumentDescriptionTypeRequired
entityEntity that will have its light color changed.StringYes
colorNew color for the light.ColorYes
durationFade duration from its current color to the new color.DecimalNo

Example:

set_entity_light_color(self, color[255, 0, 255], 1)

Results: The entity to which the script is attached (i.e. “self”) will have the color of its light changed to purple over a duration of one second.

Use the Set Entity Light Color function to dim/brighten a lamp in a room or to emulate a multi-color light (like an LED on an electronic device).

Editor Node:

Visual Demo:

set_entity_light_color.1502293234.txt.gz · Last modified: 2017/08/09 08:40 by justin