User Tools

Site Tools


apply_lighting_preset

This is an old revision of the document!


Apply Lighting Preset


Changes…

Signature:

apply_lighting_preset(preset_name, duration)
ArgumentDescriptionTypeRequired
preset_nameGroup of entities that will have their light color changed.StringYes
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.

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:

apply_lighting_preset.1639437765.txt.gz · Last modified: 2021/12/13 15:22 by justin