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

light_spot

From Valve Developer Community
Jump to navigation Jump to search
Class hierarchy
CLight
CPointEntity
CBaseEntity
lights.cpp
Light spot goldsrc.png

light_spot is a point entity available in all GoldSrc 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.

AltNames.pngAltNames:light and light_spot are both tied to the same C++ class in game, and only differ in QRAD/HLRAD.
Note.pngNote:Use an info_null entity to have your light_spot point to a certain spot.

Key values

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.

Light:

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 !FGD Underwater light mutation mmnnmmnnnmmnn Lightstyle 12.gif
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%. Requires light to have a targetname.
Inner (bright) angle <integer>
The angles of the inner spotlight beam.
Outer (fading) angle <integer>
The angles of the outer spotlight beam.
Is Sky <integer>
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.
  • 0 : No
  • 1 : Yes
Target <target_destination>
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) <angle>
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 <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:

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.


Spawnflags

  • 1 : Initially dark