Description
Gets provided object's lighting information.
Note
The command will use local player's night vision state to determine whether to include IR lights in the result or not.
On a dedicated server, headless client or if the player is null, the night vision state will always be off.
Syntax
getLightingAt obj
Parameters:
obj: Object
Returns: Array with [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]
- ambientLightColor: Color (RGB)
- ambientLightBrightness: Number
- dynamicLightColor: Color (RGB)
- dynamicLightBrightness: Number
Examples
Example 1
getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]
Example 2
getLightingAt player params ["_ambientLightColour", "_ambientLightBrightness", "_dynamicLightColour", "_dynamicLightBrightness"];