Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:Sets the light point color.

This affects the color the illuminated area takes on, as well as the color of the light "halo" (if the light setLightBrightness is higher than about 0.2, a "halo" can be seen around the light point). While the RGB component values can be as high as 255, it is easier to adjust the desired color by using lower values (for example, 0-10). What matters the most is the proportion of red / green / blue.

Syntax

Syntax:light setLightColor [r, g, b]
Parameters:
  • light: Object - Light point (see Light Systems in VBS in the VBS3 Developer Reference).
  • [r, g, b]: Array - Red, Green, blue components (each in the range of 0-255).
Return Value:Nothing

Examples

Examples:

Sets the color of "_light" to blue:

_light setLightColor [0,0,10];

Effect of different light and ambient colors:

Demo mission to experiment with different color settings: LightSettings.zip

Additional Information

See also: setLightAmbient getLightAmbient setLightBrightness getLightBrightness getLightColor, laserObjects
Multiplayer:
Problems:

Notes