getLightInfo: Difference between revisions

From Bohemia Interactive Community
m (Add devbranch)
mNo edit summary
Line 14: Line 14:
|p1= light: [[Object]] - {{hl|#lightpoint}} or {{hl|#lightreflector}}
|p1= light: [[Object]] - {{hl|#lightpoint}} or {{hl|#lightreflector}}


|r1= [[Array]] in format [intensity, diffuseColor, ambientColor, dayLight, IR, useFlare, flareSize, flareMaxDistance, attenuationPars, attachedToPars, conePars, volumeShapePars], where:
|r1= [[Array]] with [intensity, diffuseColor, ambientColor, dayLight, IR, useFlare, flareSize, flareMaxDistance, attenuationPars, attachedToPars, conePars, volumeShapePars]:
 
* 0 - intensity: [[Number]] - getter for [[setLightIntensity]] ([[setLightBrightness]] also sets intensity in a weird way, but it is also obsolete)
* 0 - intensity: [[Number]] - getter for [[setLightIntensity]] ([[setLightBrightness]] also sets intensity in a weird way, but it is also obsolete)
* 1 - diffuseColor: [[Color]] - getter for [[setLightColor]]
* 1 - diffuseColor: [[Color]] - getter for [[setLightColor]]

Revision as of 10:42, 1 January 2026

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.22.

Description

Description:
Returns various properties for the given #lightpoint or #lightreflector. ConePars and VolumeShapePars are exclusive properties of #lightreflector only.
Groups:
Object Manipulation

Syntax

Syntax:
getLightInfo light
Parameters:
light: Object - #lightpoint or #lightreflector
Return Value:
Array with [intensity, diffuseColor, ambientColor, dayLight, IR, useFlare, flareSize, flareMaxDistance, attenuationPars, attachedToPars, conePars, volumeShapePars]:

Alternative Syntax

Syntax:
light getLightInfo index
Parameters:
light: Object - #lightpoint or #lightreflector
index: Number - property index (see main syntax, for example 0 for light intensity)
Return Value:
Anything - depends on the requested property, or Nothing

Examples

Example 1:
private _lightInfo = getLightInfo light1;
Example 2:
private _lightIntensity = light1 getLightInfo 0;

Additional Information

See also:
setLightIntensity setLightColor setLightAmbient setLightDayLight setLightIR setLightUseFlare setLightFlareSize setLightFlareMaxDistance setLightAttenuation lightAttachObject lightDetachObject setLightConePars getUnitFreefallInfo setLightConePars getEntityInfo getModelInfo

Notes

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