setLightIntensity: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ")
m (Fix)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
|version1= 0.50


|0.50
|gr1= Lights
 
|gr1 = Lights


|arg= local
|arg= local
Line 11: Line 10:
|eff= local
|eff= local


| Sets intensity of light.
|descr= Sets intensity of light.
{{Feature|informative|Intensity formula is as follows: <sqf>Intensity = Brightness ^ 2 * 2500;</sqf>
<spoiler text="Test code">
<sqf>
[4096, 4096, 10] spawn {
private _brightness = 1;
private _intensity = _brightness ^ 2 * 2500;


| light [[setLightIntensity]] value
private _obj = "Sign_Sphere10cm_F" createVehicleLocal _this;
private _light = "#lightpoint" createVehicleLocal _this;
_light setLightDayLight true;
_light setLightAmbient [1, 1, 1];
_light setLightColor [1, 1, 1];
 
_light setLightBrightness _brightness;
sleep 0.2;
_brightness = getLightingAt _obj select 3;
 
_light setLightIntensity _intensity;
sleep 0.2;
_intensity = getLightingAt _obj select 3;
 
systemChat format ["%1 (%2, %3)", _brightness == _intensity, _brightness, _intensity];
 
deleteVehicle _light;
deleteVehicle _obj;
};
</sqf>
</spoiler>
}}
 
|s1= light [[setLightIntensity]] value


|p1= light: [[Object]]
|p1= light: [[Object]]
Line 19: Line 47:
|p2= value: [[Number]]
|p2= value: [[Number]]


| [[Nothing]]
|r1= [[Nothing]]


|x1= <code>myLight [[setLightIntensity]] 4;</code>
|x1= <sqf>myLight setLightIntensity 4;</sqf>


| [[setLightAmbient]], [[setLightColor]], [[lightAttachObject]], [[lightDetachObject]], [[setLightBrightness]], [[setLightAttenuation]], [[setLightUseFlare]], [[setLightFlareSize]], [[setLightFlareMaxDistance]], [[setLightDayLight]]
|seealso= [[setLightAmbient]] [[setLightColor]] [[lightAttachObject]] [[lightDetachObject]] [[setLightBrightness]] [[setLightAttenuation]] [[setLightUseFlare]] [[setLightFlareSize]] [[setLightFlareMaxDistance]] [[setLightDayLight]]
}}


|
{{Note
|user= ffur2007slx2_5
|timestamp= 20140324233700
|text= In {{arma3}} ver1.14 [[setLightIntensity]] will overwrite the previous effect processed by [[setLightBrightness]] on the same light source, vice versa. And both of them currently play the same role on brightness, for example: <sqf>
_light setLightIntensity 3000;
// same as
_light setLightBrightness 1;
</sqf>
}}
}}
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Mar 24, 2014 - 23:37</dd>
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]<dd class="note">In ArmA3 ver1.14 [[setLightIntensity]] will overwrite the previous effect processed by [[setLightBrightness]] on the same light source, vice versa. And both of them currently play the same role on brightness, for example: <code>_light [[setLightIntensity]] 3000;// same as _light [[setLightBrightness]] 1;</code>
<!-- Note Section END -->
</dl>

Latest revision as of 22:11, 10 October 2023

Hover & click on the images for description

Description

Description:
Sets intensity of light.
Intensity formula is as follows:
Intensity = Brightness ^ 2 * 2500;

[4096, 4096, 10] spawn { private _brightness = 1; private _intensity = _brightness ^ 2 * 2500; private _obj = "Sign_Sphere10cm_F" createVehicleLocal _this; private _light = "#lightpoint" createVehicleLocal _this; _light setLightDayLight true; _light setLightAmbient [1, 1, 1]; _light setLightColor [1, 1, 1]; _light setLightBrightness _brightness; sleep 0.2; _brightness = getLightingAt _obj select 3; _light setLightIntensity _intensity; sleep 0.2; _intensity = getLightingAt _obj select 3; systemChat format ["%1 (%2, %3)", _brightness == _intensity, _brightness, _intensity]; deleteVehicle _light; deleteVehicle _obj; };

Groups:
Lights

Syntax

Syntax:
light setLightIntensity value
Parameters:
light: Object
value: Number
Return Value:
Nothing

Examples

Example 1:
myLight setLightIntensity 4;

Additional Information

See also:
setLightAmbient setLightColor lightAttachObject lightDetachObject setLightBrightness setLightAttenuation setLightUseFlare setLightFlareSize setLightFlareMaxDistance setLightDayLight

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
ffur2007slx2_5 - c
Posted on Mar 24, 2014 - 23:37 (UTC)
In Arma 3 ver1.14 setLightIntensity will overwrite the previous effect processed by setLightBrightness on the same light source, vice versa. And both of them currently play the same role on brightness, for example:
_light setLightIntensity 3000; // same as _light setLightBrightness 1;