======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). ====Signature:==== set_entity_light_color(entity, color, duration) ^Argument^Description^Type^Required^ |entity|[[Entity]] that will have its light [[color]] changed.|[[Entity]]|Yes| |color|New [[color]] for the light.|[[Color]]|Yes| |duration|Fade duration from its current [[color]] to the new [[color]].|[[Number]]|No| If you'd like to instantly toggle the [[entity|entity's]] light on or off instead of changing its [[color]], see the related [[Set Entity Light Enabled]] function. ====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 change to magenta 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:==== {{:wiki:set_entity_light_color_node.png?nolink|}} ====Visual Demo:==== {{:wiki:set_entity_light_color_demo.gif?nolink|}} ~~NOTOC~~