武装突袭 Wiki
Advertisement
Introduced with Arma 3 version 0.50
  Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
0.50

描述

描述:
Sets attenuation of light. Standard method of attenuation (1 / (constant + linear*dist + quadratic*dist*dist)). start param represents distance, where the attenuation starts to take effects (dist = distance - start).

基本句法

句法:
light setLightAttenuation [start, constant, linear, quadratic, hardlimitstart, hardlimitend]
参数:
light: Object
[start, constant, linear, quadratic, hardlimitstart, hardlimitend]: Array
start: Number - distance with 100% intensity, falloff starts here
constant: Number - constant attenuation coef
linear: Number - linear attenuation coef
quadratic: Number - quadratic attenuation coef
hardlimitstart (Optional): Number - max distance hard limit start (start of fading of intensity to 0) in m
hardlimitend (Optional): Number - max distance hard limit end (end of fading of intensity to 0) in m
返回值:
Nothing

范例

范例1:
myLight setLightAttenuation [2,4,4,0,9,10];

额外资讯

多人游戏:
-
也可以看看:
setLightAmbientsetLightColorlightAttachObjectlightDetachObjectsetLightBrightnesssetLightIntensitysetLightUseFlaresetLightFlareSizesetLightFlareMaxDistancesetLightDayLight

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

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.

Bottom Section

Advertisement