getLightingAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
m (Add more information)
Line 7: Line 7:


|descr= Gets provided object's lighting information.
|descr= Gets provided object's lighting information.
{{Feature|informative|The command will use [[local]] [[player]]'s night vision state to determine whether to include IR lights in the result or not.<br>
On a dedicated server<!-- (or anywhere where [[player]] [[isNull|is null]] or without [[hasInterface|interface]])-->, the night vision state will always be off.}}


|s1= [[getLightingAt]] obj
|s1= [[getLightingAt]] obj
Line 12: Line 14:
|p1= obj: [[Object]]
|p1= obj: [[Object]]


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


|x1=<code>[[getLightingAt]] [[player]]; {{cc|returns [<nowiki/>[1,1,1], 0.5, [0,0,0], 0]}}</code>
|x1= <code>[[getLightingAt]] [[player]]; {{cc|returns [<nowiki/>[1,1,1], 0.5, [0,0,0], 0]}}</code>


|seealso= [[getLighting]] [[Lightpoint Tutorial]]
|seealso= [[getLighting]] [[Lightpoint Tutorial]]
}}
}}

Revision as of 17:47, 25 August 2021

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, the night vision state will always be off.
Groups:
Lights

Syntax

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

Examples

Example 1:
getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]

Additional Information

See also:
getLighting Lightpoint Tutorial

Notes

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