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
(Added entity page)
 
 
(19 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{back|List of HL1 entities}}
{{TabsBar|main=Light}}
{{GoldSource base point|light}}
{{this is a|point entity|name=light|engine=GoldSrc}} It's an invisible [[static light]] source, which can optionally be toggled or flicker.


== Description ==
{{altnames|{{mono|light}} and {{mono|[[light_spot (GoldSrc)|light_spot]]}} are both tied to the same C++ class in game, and only differ in QRAD/HLRAD.}}
Invisible [[static light]] source.
== Key Values ==
 
== Key values ==
{{Hl1 kv target}}
{{Hl1 kv target}}
{{Hl1 kv targetname}}
:{{note|If a light targets a entity, it becomes a spotlight, like [[light_spot (GoldSrc)|light_spot]].}}
{{Hl1 kv targetname|light=1}}
{{Hl1 kv light}}
{{Hl1 kv light}}
{{Hl1 kv zhlt point}}
{{Hl1 kv zhlt light source}}


== Spawnflags ==
== Flags ==
* 1 : Initially dark
{{fl|1|Initially dark}}
[[Category:Half-Life Entities]]
[[Category:Half-Life]]

Latest revision as of 14:03, 24 April 2025

edit

light is a point entity available in all GoldSrc GoldSrc games. It's an invisible static light source, which can optionally be toggled or flicker.

AltNames.pngAltNames:light and light_spot are both tied to the same C++ class in game, and only differ in QRAD/HLRAD.

Key Values

Target (target) <targetname>
The targetname of an entity this entity will trigger when activated.
Note.pngNote:If a light targets a entity, it becomes a spotlight, like light_spot.
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Icon-Important.pngImportant:Naming a static light radically changes its behavior. See Naming Lights for details.

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 light source:

ZHLT Fade <float>
ZHLT Falloff <integer>
  • 0 : Default
  • 1 : Inverse Linear
  • 2 : Inverse Square
Texlight (VHLT+) (_tex) <texture>
HLCSG will rename this entity to light_surface, using the specified texture as the emissive texture. See light_surface page for additional relevant KVs.


Flags

Initially dark : [1]