setLightAttenuation: Difference between revisions
Jump to navigation
Jump to search
m (note formate) |
patriot821 (talk | contribs) (alternative syntax - hardlimit parameter) |
||
Line 27: | Line 27: | ||
| [[Nothing]] |= RETURNVALUE | | [[Nothing]] |= RETURNVALUE | ||
____________________________________________________________________________________________ | |||
| s2= light '''setLightAttenuation''' [start, constant, linear, quadratic, hardlimitstart, hardlimitend] |= Syntax | |||
|p21= light: [[Object]] |= PARAMETER1 | |||
|p22= [start, constant, linear, quadratic, hardlimitstart, hardlimitend]: [[Array]] |= PARAMETER2 | |||
|p23= start: [[Number]] |= PARAMETER3 | |||
|p24= constant: [[Number]] |= PARAMETER4 | |||
|p25= linear: [[Number]] |= PARAMETER5 | |||
|p26= quadratic: [[Number]] |= PARAMETER6 | |||
|p27= hardlimitstart: [[Number]] |= PARAMETER7 | |||
|p28= hardlimitend: [[Number]] |= PARAMETER8 | |||
| r2= [[Nothing]] |= RETURNVALUE | |||
____________________________________________________________________________________________ | |||
|x1= <code>{{Example needed}}</code> |= Example 1 | |x1= <code>{{Example needed}}</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[setLightAmbient]], [[setLightColor]], [[lightAttachObject]], [[lightDetachObject]], [[setLightBrightness]], [[setLightIntensity]], [[setLightUseFlare]], [[setLightFlareSize]], [[setLightFlareMaxDistance]], [[setLightDayLight]] |= See also | | [[setLightAmbient]], [[setLightColor]], [[lightAttachObject]], [[lightDetachObject]], [[setLightBrightness]], [[setLightIntensity]], [[setLightUseFlare]], [[setLightFlareSize]], [[setLightFlareMaxDistance]], [[setLightDayLight]] |= See also |
Revision as of 13:44, 30 December 2014
Description
- Description:
- Sets attenuation of light.
- Groups:
- Uncategorised
Syntax
- Syntax:
- light setLightAttenuation [start, constant, linear, quadratic]
- Parameters:
- light: Object
- [start, constant, linear, quadratic]: Array
- start: Number
- constant: Number
- linear: Number
- quadratic: Number
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- light setLightAttenuation [start, constant, linear, quadratic, hardlimitstart, hardlimitend]
- Parameters:
- light: Object
- [start, constant, linear, quadratic, hardlimitstart, hardlimitend]: Array
- start: Number
- constant: Number
- linear: Number
- quadratic: Number
- hardlimitstart: Number
- hardlimitend: Number
- Return Value:
- Nothing
Examples
- Example 1:
Template:Example needed
Additional Information
- See also:
- setLightAmbientsetLightColorlightAttachObjectlightDetachObjectsetLightBrightnesssetLightIntensitysetLightUseFlaresetLightFlareSizesetLightFlareMaxDistancesetLightDayLight
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
Notes
- Posted on Mar 25, 2014 - 12:31
- ffur2007slx2_5
-
(A3 1.14) setLightAttenuation array will present fallowing visual effects:
[start(SCALAR), constant(SCALAR), linear (SCALAR), quadratic(SCALAR)]
start(SCALAR) – Number can be unlimited, this parameter determines the range that the light source takes effect. Terrain environmental color will be bathed by setLightAmbient within the range and its covered objects will reflect the color by setLightColor.
constant(SCALAR) – Support signed number, this parameter determines the brightness proportion of the light source, higher the number is, less the brightness will be, vice versa. Any minus value passed will be treated as 0 (100% brightness). In other words, this parameter is related with setLightBrightness and setLightIntensity.
linear (SCALAR) – Support signed number, effective range is from 0 ~ 100 (passed minus value will be treated as 0), this parameter determines the concentration of the light source, higher the number is, more will the light concentrate, vice versa. In other words, this parameter will turn the source into spotlight and sharpens its light circle border.
Please pay attention to a special value: 4.31918e-005
e.g.
_light setLightAttenuation [2,4,4.31918e-005,0]; //This value will make the light source reach an ultra high effect range.
Any initial param set before will be discarded and overwritten.
quadratic(SCALAR) – Support signed number (range unlimited, passed minus number will be treated as 0), this parameter determines the range that the light source is visible and its visual presentation looks similar to linear. 0 means the maximum visible range. In further explanation, a less bright source can’t be seen out of the range on the land but still visible on the sea, and a bright enough source won’t be effected by the passed range who is still visible out of the range.
Please pay attention to a special value: 4.31918e-005
e.g.
_light setLightAttenuation [6,0,0,4.31918e-005]; //This value will make the light source reach an ultra high effect range.
Any initial param set before will be discarded and overwritten.