Light Source Tutorial: Difference between revisions
Lou Montana (talk | contribs) (Add #lightreflector commands and other intel) |
Lou Montana (talk | contribs) m (Text replacement - " ''via'' " to " via ") |
||
Line 15: | Line 15: | ||
=== Colour === | === Colour === | ||
Colour set | Colour set via [[setLightColor]] determines the lens [[#Flare|flare]] effect colour, as well as light's first colour. | ||
=== Ambient === | === Ambient === | ||
Colour set | Colour set via [[setLightAmbient]] determines the outer colour shone by the light source. | ||
{{Feature|important|Light colour does not affect AI spotting ability, but ambient '''does'''.}} | {{Feature|important|Light colour does not affect AI spotting ability, but ambient '''does'''.}} | ||
Latest revision as of 12:44, 21 February 2025
Basics
A light source is a non-physical object that shines a light. Its light does not cast shadows (only the sun or the moon can) and can go through walls. It can be of one of these two types:
- A light point (glowing light source) is an all-directional light source, like a floating lightbulb, that emits light all around it.
- A light reflector, much like projectors or vehicle headlights, is a beam-shaped light that was introduced in
2.06 (see this example below).
Such light source 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 light source.
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 light source commands can be found in the Lights command group category.
Create a Light Source
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
Set IR
Set Reflector Angles
Set Cone Parameters
Set Reflector Volume Shape
Delete Light Source
Examples
Dark Souls
Contact
Heli Spotlight