setLightIntensity: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Add brightness formula, thanks to Coryf88 on Discord) |
Lou Montana (talk | contribs) m (Fix) |
||
Line 18: | Line 18: | ||
private _intensity = _brightness ^ 2 * 2500; | private _intensity = _brightness ^ 2 * 2500; | ||
private _obj = "Sign_Sphere10cm_F" createVehicleLocal _this; | |||
private _light = "#lightpoint" createVehicleLocal _this; | private _light = "#lightpoint" createVehicleLocal _this; | ||
_light setLightDayLight true; | _light setLightDayLight true; | ||
Line 25: | Line 26: | ||
_light setLightBrightness _brightness; | _light setLightBrightness _brightness; | ||
sleep 0.2; | sleep 0.2; | ||
_brightness = getLightingAt | _brightness = getLightingAt _obj select 3; | ||
_light setLightIntensity _intensity; | _light setLightIntensity _intensity; | ||
sleep 0.2; | sleep 0.2; | ||
_intensity = getLightingAt | _intensity = getLightingAt _obj select 3; | ||
systemChat format ["%1 (%2, %3)", _brightness == _intensity, _brightness, _intensity]; | systemChat format ["%1 (%2, %3)", _brightness == _intensity, _brightness, _intensity]; | ||
deleteVehicle _light; | deleteVehicle _light; | ||
deleteVehicle _obj; | |||
}; | }; | ||
</sqf> | </sqf> |
Latest revision as of 22:11, 10 October 2023
Description
- Description:
- Sets intensity of light.
- 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
- 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: