getLightingAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "Lightpoint Tutorial" to "Light Source Tutorial")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


|game1= arma3dev
|game1= arma3
|version1= 2.00


|version= 1.99
|gr1= Lights
 
|gr1 = Lights |GROUP1=


|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, [[Arma 3: Headless Client|headless client]] or if the player is [[objNull|null]], the night vision state will always be off.}}


|s1= [[getLightingAt]] obj
|s1= [[getLightingAt]] obj
Line 13: 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]]
* 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= <sqf>getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]</sqf>


|seealso= [[getLighting]] [[:Category:Command Group: Lights|Command Group: Lights]] [[Lightpoint Tutorial]]
|x2= <sqf>getLightingAt player params ["_ambientLightColour", "_ambientLightBrightness", "_dynamicLightColour", "_dynamicLightBrightness"];</sqf>
 
|seealso= [[getLighting]] [[Light Source Tutorial]]
}}
}}
<dl class="command_description">
<!-- BEGIN Note Section -->
<!-- END Note Section -->
</dl>
<h3 style="display:none">Bottom Section</h3>

Latest revision as of 14:28, 27 April 2023

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 in 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 or on the Forums.
Only post proven facts here! Add Note