Light spot (GoldSrc): Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
AltNames:light and light_spot are both tied to the same C++ class in game, and only differ in QRAD/HLRAD.
Note:Use an info_null entity to have your light_spot point to a certain spot.
		
	
No edit summary  | 
				SirYodaJedi (talk | contribs)   | 
				||
| (18 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
{{  | {{TabsBar|main=Light spot}}  | ||
{{  | {{CD|CLight|goldsrc=1}}  | ||
{{this is a|point entity|name=light_spot|engine=GoldSrc}}  | |||
A cone-shaped, invisible light source. Can be turned on and off through targets, though switchable lights may cause lightmap errors. This is a static spotlight that can be pointed at another entity.  | |||
=  | {{altnames|{{ent|engine=goldsrc|light}} and {{mono|light_spot}} are both tied to the same C++ class in game, and only differ in QRAD/HLRAD.}}  | ||
{{Note|Use an {{ent|engine=goldsrc|info_null}} entity to have your light_spot point to a certain spot.}}  | |||
{{Note|Use an   | |||
== Key values ==  | == Key values ==  | ||
{{Hl1 kv targetname}}  | {{Hl1 kv targetname|light=1}}  | ||
{{Hl1 kv light}}  | {{Hl1 kv light}}  | ||
{{kv|Inner (bright) angle|int|The angles of the inner spotlight beam.}}  | |||
{{kv|Outer (fading) angle|integer|The angles of the outer spotlight beam.}}  | |||
{{kv|intn=_sky|Is sky?|boolean|Whether or not this light should be used as sunlight cast from sky brushes.<br>Unlike {{ent|engine=goldsrc|light_environment}}, this does not have any special effect on MDL lighting, and does not have a per-PVS limit.}}  | |||
{{kv|intn=target|Target|target_destination|The name of an entity in the map that the spotlight will point at. This will override the spotlight's angles.}}  | |||
{{KV Angles}}  | {{KV Angles}}  | ||
{{kv|Pitch|angle|Overrides the pitch value in Angles, even if left at 0, so it needs to be specified. Contrary to Angles, the rotation of this pitch is measured counter-clockwise from the horizontal, so that 90 is straight up, while -90 is straight down. (It's simply the negative of a normal pitch value.)}}  | |||
{{Hl1 kv zhlt   | {{Hl1 kv zhlt light source}}  | ||
== Spawnflags ==  | == Spawnflags ==  | ||
Latest revision as of 13:03, 24 April 2025
| CLight | 
light_spot  is a   point entity  available in all 
 GoldSrc games.
A cone-shaped, invisible light source. Can be turned on and off through targets, though switchable lights may cause lightmap errors. This is a static spotlight that can be pointed at another entity.
Key values
- Name (targetname) <string>
 - The targetname that other entities refer to this entity by.
Important: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: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 
10 Fluorescent flicker mmamammmmammamamaaamammma 
2 Slow, strong pulse abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba 
11 Slow pulse, noblack abcdefghijklmnopqrrqponmlkjihgfedcba 
5 Gentle pulse jklmnopqrstuvwxyzyxwvutsrqponmlkj 
1 Flicker A mmnmmommommnonmmonqnmmo 
6 Flicker B nmonqnmomnmomomno 
3 Candle A mmmmmaaaaammmmmaaaaaabcdefgabcdefg 
7 Candle B mmmaaaabcdefgmmmmaaaammmaamm 
8 Candle C mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa 
4 Fast strobe mamamamamama 
9 Slow strobe aaaaaaaazzzzzzzz 
12 Underwater light mutation mmnnmmnnnmmnn 
63 Testing (Off) !FGD a 
- 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.
 
- Is sky? (_sky) <boolean>
 - Whether or not this light should be used as sunlight cast from sky brushes.
Unlike light_environment, this does not have any special effect on MDL lighting, and does not have a per-PVS limit. 
- Target (target) <targetname>
 - The name of an entity in the map that the spotlight will point at. This will override the spotlight's angles.
 
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
 - This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
 
- Pitch ([todo internal name (i)]) <angle>
 - Overrides the pitch value in Angles, even if left at 0, so it needs to be specified. Contrary to Angles, the rotation of this pitch is measured counter-clockwise from the horizontal, so that 90 is straight up, while -90 is straight down. (It's simply the negative of a normal pitch value.)
 
ZHLT light source:
- 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.
 
Spawnflags
- 1 : Initially dark