Light Source Tutorial: Difference between revisions
Hypoxic125 (talk | contribs) No edit summary |
Hypoxic125 (talk | contribs) m (→Heli Spotlight) |
||
Line 118: | Line 118: | ||
<sqf> | <sqf> | ||
private _reflector = "#lightreflector" | private _reflector = "#lightreflector" createVehicleLocal [0,0,0]; | ||
_reflector attachTo [myHeliVariable, [0,0,0], "light_l"]; | _reflector attachTo [myHeliVariable, [0,0,0], "light_l"]; | ||
_reflector setLightColor [1,1,1]; | _reflector setLightColor [1,1,1]; | ||
Line 127: | Line 127: | ||
_reflector setVectorDirAndUp _vector3D; | _reflector setVectorDirAndUp _vector3D; | ||
private _light = "#lightpoint" | private _light = "#lightpoint" createVehicleLocal [0,0,0]; | ||
_light attachTo [myHeliVariable, [0,0,0], "light_l"]; | _light attachTo [myHeliVariable, [0,0,0], "light_l"]; | ||
_light setLightColor [1,1,1]; | _light setLightColor [1,1,1]; | ||
Line 137: | Line 137: | ||
_light setLightIntensity 10; | _light setLightIntensity 10; | ||
</sqf> | </sqf> | ||
== See Also == | == See Also == |
Revision as of 19:21, 2 March 2023
Basics
A lightpoint (glowing light source) is a non-physical object that shines a light. Unlike projectors or vehicle headlights, this light type cannot be directed into a beam and can only glow uniformously. The glowing does not cast shadows (only the sun or the moon can) and can go through walls.
A lightpoint is local to the computer where the script has been called; one player could see a light in the dark while another would not have such light "object" created.
Colour
Colour set via setLightColor determines the lens flare effect colour, as well as light's first colour.
Ambient
Colour set via setLightAmbient determines the outer colour shone by the lightpoint.
Flare
The flare is the "colour point" centre that emits light. It can be visible or invisible (set by setLightUseFlare).
How To
The list of all lightpoint commands can be found in the Lights command group category.
Create a Lightpoint
Set Light Colour
Colour
Ambient Colour
Set Flare
Enable Flare
Set Flare Size
Set Flare Visibility
Set Light Brightness
Set Brightness
Set intensity
Set attenuation
Make light visible by day
Delete Lightpoint