Light

From Valve Developer Community
Jump to navigation Jump to search

Template:Wrongtitle Template:Base point

Entity Description

Note.pngNote:For an article on light sources in general, proceed to Lighting.
Light.png

An invisible light source. If named, it can be turned on and off through inputs.

The light entity is basic yet essential to almost every map.

Keyvalues

Warning.pngWarning:Adding a targetname to this entity creates a dynamic (switchable) light source, and creates extra lightmap pages for each uniquely named light. This occurs regardless of whether the light entity receives any inputs at run time. Lights should not be named unless they will be turned on and off via inputs, and then only sparingly. Lights given the same name will be triggered together and share lightmap pages. Many dynamic lights in a level can cause performance problems and other errors. Lightmaps calculated for named lights are conspicuously simpler and cruder than unnamed lights.
Template:Kv light

Flags

  • 1 : Initially Off

Inputs

Turns the light on.
  • TurnOff
Turns the light off.
  • Toggle
Toggles the light on or off.
  • SetPattern
Sets the light's custom appearance to the input's parameters.
  • FadeToPattern
Fades from the light's old pattern to the new one.

Outputs