This article's documentation is for the "GoldSrc" engine. Click here for more information.

Light (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{Entitytabs|goldsrc=1|source=1|source2=1|main=source|light}}
{{Entitytabs|goldsrc=1|source=1|source2=1|main=source|light}}
{{Entity|light|engine=gldsrc|type=e0}} It's an invisible [[static light]] source.
{{This is a|name=light|engine=gldsrc|e0}} It's an invisible [[static light]] source.


== Key Values ==
== Key Values ==

Revision as of 01:22, 9 September 2023

light is an e0 available in all GoldSrc GoldSrc games.

Warning.pngWarning:
  • The {{{engine}}} parameter is inconsistent with the name defined by the {{gldsrc}} template. This can most likely be fixed by setting the value of the {{{engine}}} parameter to GoldSrc.
    If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.

It's an invisible static light source.

Key Values

Target (target) <targetname>
The targetname of an entity this entity will trigger when activated.
Name (targetname) <string>
The targetname that other entities refer to this entity by.

Light:

Color + Brightness (_light) <color255 + int>
The RGB color and brightness of the light. Colors must be between 0 and 255; brightness can be anything.
Note.pngNote:Negative brightness will suck out the amount of lighting that the equivalent positive brightness would cast.
Appearance (lightstyle) (style) <choices>
Various lightstyle presets. Cannot be used on named lights.
Lightstyle presets (epilepsy warning)
Literal Value Description Sequence Preview
0 Normal m Lightstyle 0.png
10 Fluorescent flicker mmamammmmammamamaaamammma Lightstyle 10.gif
2 Slow, strong pulse abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba Lightstyle 2.gif
11 Slow pulse, noblack abcdefghijklmnopqrrqponmlkjihgfedcba Lightstyle 11.gif
5 Gentle pulse jklmnopqrstuvwxyzyxwvutsrqponmlkj Lightstyle 5.gif
1 Flicker A mmnmmommommnonmmonqnmmo Lightstyle 1.gif
6 Flicker B nmonqnmomnmomomno Lightstyle 6.gif
3 Candle A mmmmmaaaaammmmmaaaaaabcdefgabcdefg Lightstyle 3.gif
7 Candle B mmmaaaabcdefgmmmmaaaammmaamm Lightstyle 7.gif
8 Candle C mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa Lightstyle 8.gif
4 Fast strobe mamamamamama Lightstyle 4.gif
9 Slow strobe aaaaaaaazzzzzzzz Lightstyle 9.gif
12 Underwater light mutation mmnnmmnnnmmnn Lightstyle 12.gif
63 Testing (Off) !FGD a Lightstyle 63.png
Custom Appearance (pattern) <string>
A string of english letters, like a sequence of piano keys, that define a pattern of brightness. a is 0%, m is 100%, and z is 200%. Updates at 10 Hz. Requires light to have a targetname.


ZHLT:

Copy lighting from (VHLT+) (zhlt_copylight) <targetname>
Copies the lighting from the named entity to the nearest lightmap luxel below this entity's origin.
Tip.pngTip:To avoid having the copied lighting visibly affecting the brush lighting, put a 16x16x1 func_detail with zhlt_noclip enabled directly below this model's origin. Texture the top face with black_HIDDEN, and the rest of the faces with SKIP.
Note.pngNote:Not compatible with entities using the effect flag EF_INVLIGHT.
Model shadows (UMHLT, SDHLT) (zhlt_studioshadow) <boolean>
Enable to cast shadows from MDLs found in the model KV.
Model shadow mode (SDHLT) (zhlt_shadowmode) <choices>
0 - Use Bounding Box
1 - Use triangles (default)
2 - Use Bounding boxes of triangles


Flags

Initially dark : [1]