Copyright © 2025-2026 Candy ArtsCS Light
The CS_Light command changes the color and energy of Light2D and Light3D nodes in the game world, at once or progressively.
Keys
Every key also accepts a ¢ expression instead of a fixed value, unless its description says otherwise. See CandyRef Expressions.
Targets
Description:
The nodes the command acts on. Each key identifies a node, and its value is a Dictionary of settings for that node (see below), or an empty Dictionary for none. The Engine reports an entry it can't find and skips it, without affecting the others.
Values:
• Container/Name: A node inside one of the containers listed in the Engine's cs_paths, such as Actors/Hero for the node Hero in the Actors container. The name can be a longer path, such as Actors/Hero/Hat.
• Container/°role: The node named after the Actor assigned to that Role, such as Actors/°guard. A Role always needs its container.
• Node path: A path relative to the Engine, or an absolute path such as /root/Game/Hero.
• ¢ expression: Can also return the node itself, such as ¢$Level/Hero (a path from the Engine).
Target Settings
Each target in Targets accepts the following keys.
Color
Description:
The light's new color.
Values:
• #rrggbb: A hexadecimal color, such as #ff8800.
• (r, g, b) or (r, g, b, a): Components from 0 to 1, such as (1, 0.5, 0).
• Color name: A named color, such as red or cornflower_blue.
• Empty: Leave the color unchanged.
• ¢ expression: Can also return a Color, such as ¢Color.RED, an Array of components from 0 to 1, such as ¢[1, 0.5, 0], or a Dictionary with r, g, b and a keys.
Energy
Description:
The value applied to the light's energy, according to Operator.
Values:
• Number: Such as 1.5.
• Empty: Leave the energy unchanged.
Operator
Description:
How Energy is applied to the light's energy. It doesn't affect Color.
Values:
• =: Set the energy to Energy.
• +: Add Energy.
• -: Subtract Energy.
• *: Multiply by Energy.
• /: Divide by Energy.
• Empty: Not valid when Energy is set: the Engine reports an error, and the energy is left unchanged.
Time
Description:
How long Color and Energy take to reach their new values. Both change together, and every light of the Line starts changing at once.
A new change replaces the one a light is still making, for what it changes: a Line that only sets Energy leaves a color change running. An Operator other than = counts from the energy a running change is heading towards, so two Lines that multiply by 2 multiply by 4.
The change belongs to the game world: it continues while the Dialogue is suspended, and after the Dialogue ends.
Values:
• 0: Change at once (the default).
• Seconds: Change over that time, such as 2 or 0.5. The Dialogue continues meanwhile.
• !Seconds: Change over that time, such as !2, and delay the Dialogue until the change is complete. With several lights, the Dialogue waits for the longest.