Light: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(warning about named lights)
Line 9: Line 9:
==Keyvalues==
==Keyvalues==
* {{kv targetname}}
* {{kv targetname}}
{{warning|Adding a name 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.}}
{{warning|Adding a name 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. A reduction in lightmap quality should be expected when dealing with named lights.}}


* {{kv light}}
* {{kv light}}

Revision as of 15:29, 25 July 2007

Template:Wrongtitle

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

Entity Description

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 name 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. A reduction in lightmap quality should be expected when dealing with named lights.

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

See Also