setLightBrightness: Difference between revisions

From Bohemia Interactive Community
(added example of how to create light object used with this command)
No edit summary
 
(57 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


|1.00|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Set brightness of light. |= Description
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| light '''setLightBrightness''' brightness |= Syntax
|game4= tkoh
|version4= 1.00


|p1= light: [[Object]] |= Parameter 1
|game5= arma3
|version5= 0.50


|p2= brightness: [[Number]] |= Parameter 2
|gr1= Lights


| [[Nothing]] |= Return value
|arg= local
____________________________________________________________________________________________


| |= See also
|eff= local


}}
|descr= Set brightness of light. Does nothing for light reflector, for light point the formula is [[setLightIntensity]] ((brightness * 50) ^ 2)
{{Feature|arma3|This command is outdated. Use [[setLightIntensity]] instead.}}


<h3 style="display:none">Notes</h3>
|s1= light [[setLightBrightness]] brightness
<dl class="command_description">
<!-- Note Section BEGIN -->
Light can be created with command createVehicle with special vehicle class "#lightpoint"


for example:
|p1= light: [[Object]]


_light = "#lightpoint" createVehicleLocal pos;
|p2= brightness: [[Number]]


_light setLightBrightness 1.0;
|r1= [[Nothing]]


_light setLightAmbient[0.0, 1.0, 0.0];
|x1= <sqf>myLight setLightBrightness 2;</sqf>


_light setLightColor[0.0, 1.0, 0.0];
|seealso= [[setLightIntensity]] [[setLightAmbient]] [[setLightColor]] [[lightAttachObject]] [[lightDetachObject]] [[setLightAttenuation]] [[setLightUseFlare]] [[setLightFlareSize]] [[setLightFlareMaxDistance]] [[setLightDayLight]]
}}


_light lightAttachObject [_object, [0,0,0]]
{{Note
<!-- Note Section END -->
|user= Feersum
</dl>
|timestamp= 20061201164200
 
|text= Light can be created with command [[createVehicleLocal]] with special vehicle class {{hl|"#lightpoint"}}<br>
<h3 style="display:none">Bottom Section</h3>
for example:
[[Category:Scripting Commands|SETLIGHTBRIGHTNESS]]
<sqf>
[[Category:Scripting Commands OFP Elite |SETLIGHTBRIGHTNESS]]
_light = "#lightpoint" createVehicleLocal _posAGL;
[[Category:Scripting Commands ArmA|SETLIGHTBRIGHTNESS]]
_light setLightBrightness 1.0;
_light setLightAmbient [0.0, 1.0, 0.0];
_light setLightColor [0.0, 1.0, 0.0];
_light lightAttachObject [_object, [0,0,0]];
</sqf>
}}

Latest revision as of 01:17, 4 November 2025

Hover & click on the images for description

Description

Description:
Set brightness of light. Does nothing for light reflector, for light point the formula is setLightIntensity ((brightness * 50) ^ 2)
Arma 3
This command is outdated. Use setLightIntensity instead.
Groups:
Lights

Syntax

Syntax:
light setLightBrightness brightness
Parameters:
light: Object
brightness: Number
Return Value:
Nothing

Examples

Example 1:
myLight setLightBrightness 2;

Additional Information

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

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note
Feersum - c
Posted on Dec 01, 2006 - 16:42 (UTC)
Light can be created with command createVehicleLocal with special vehicle class "#lightpoint"
for example:
_light = "#lightpoint" createVehicleLocal _posAGL; _light setLightBrightness 1.0; _light setLightAmbient [0.0, 1.0, 0.0]; _light setLightColor [0.0, 1.0, 0.0]; _light lightAttachObject [_object, [0,0,0]];