getLightingAt: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "Lightpoint Tutorial" to "Light Source Tutorial")
No edit summary
Line 14: Line 14:
|p1= obj: [[Object]]
|p1= obj: [[Object]]


|r1= [[Array]] in format [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]:
|r1= [[Array]] format [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]:
* ambientLightColor: [[Array]] in format [[Color|Color (RGB)]]
* ambientLightColor: [[Array]] format [[Color|Color (RGB)]]
* ambientLightBrightness: [[Number]]
* ambientLightBrightness: [[Number]]
* dynamicLightColor: [[Array]] in format [[Color|Color (RGB)]]
* dynamicLightColor: [[Array]] format [[Color|Color (RGB)]]
* dynamiclightBrightness: [[Number]]
* dynamiclightBrightness: [[Number]]



Revision as of 07:37, 2 January 2026

Hover & click on the images for description

Description

Description:
Gets provided object's lighting information.
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.
Groups:
Lights

Syntax

Syntax:
getLightingAt obj
Parameters:
obj: Object
Return Value:
Array format [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]:

Examples

Example 1:
getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]
Example 2:
getLightingAt player params ["_ambientLightColour", "_ambientLightBrightness", "_dynamicLightColour", "_dynamicLightBrightness"];

Additional Information

See also:
getLighting Light Source Tutorial

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note