getLightingAt: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "|version=" to "|version1=") |
BrettMayson (talk | contribs) mNo edit summary |
||
| (10 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.00 | |version1= 2.00 | ||
|gr1 = Lights | |gr1= Lights | ||
|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]] | |r1= [[Array]] with [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness] | ||
* ambientLightColor: [[Color|Color RGB]] | * ambientLightColor: [[Color|Color (RGB)]] | ||
* ambientLightBrightness: [[Number]] | * ambientLightBrightness: [[Number]] | ||
* dynamicLightColor: [[Color|Color (RGB)]] | * dynamicLightColor: [[Color|Color (RGB)]] | ||
* | * dynamicLightBrightness: [[Number]] | ||
|x1= <sqf>getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]</sqf> | |||
| | |x2= <sqf>getLightingAt player params ["_ambientLightColour", "_ambientLightBrightness", "_dynamicLightColour", "_dynamicLightBrightness"];</sqf> | ||
|seealso= [[getLighting]] [[ | |seealso= [[getLighting]] [[Light Source Tutorial]] | ||
}} | }} | ||
Latest revision as of 02:33, 3 January 2026
Description
- Description:
- Gets provided object's lighting information.
- Groups:
- Lights
Syntax
- Syntax:
- getLightingAt obj
- Parameters:
- obj: Object
- Return Value:
- Array with [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]
- ambientLightColor: Color (RGB)
- ambientLightBrightness: Number
- dynamicLightColor: Color (RGB)
- dynamicLightBrightness: Number
Examples
- Example 1:
- Example 2:
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