Light Source Tutorial: Difference between revisions
Lou Montana (talk | contribs) m (Some wiki formatting) |
Hypoxic125 (talk | contribs) No edit summary |
||
Line 113: | Line 113: | ||
deleteVehicle _this; | deleteVehicle _this; | ||
}; | }; | ||
</sqf> | |||
=== Heli Spotlight === | |||
<sqf> | |||
private _reflector = "#lightreflector" createVehicle [0,0,0]; | |||
_reflector attachTo [myHeliVariable, [0,0,0], "light_l"]; | |||
_reflector setLightColor [1,1,1]; | |||
_reflector setLightAmbient [1,1,1]; | |||
_reflector setLightIntensity 1e6; | |||
_reflector setLightConePars [60,10,1]; | |||
private _vector3D = [[[0,1,0],[0,0,1]], 0, -45, 0] call BIS_fnc_transformVectorDirAndUp; | |||
_reflector setVectorDirAndUp _vector3D; | |||
private _light = "#lightpoint" createVehicle [0,0,0]; | |||
_light attachTo [myHeliVariable, [0,0,0], "light_l"]; | |||
_light setLightColor [1,1,1]; | |||
_light setLightAmbient [1,1,1]; | |||
_light setLightUseFlare true; | |||
_light setLightFlareSize 5; | |||
_light setLightFlareMaxDistance 500; | |||
_light setLightBrightness 1000; | |||
_light setLightIntensity 10; | |||
</sqf> | </sqf> | ||
Revision as of 19:20, 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
Examples
Dark Souls
Contact
Heli Spotlight