Light: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (addition)
No edit summary
Line 2: Line 2:


==Entity Description==
==Entity Description==
'''Entity Name:''' light


An invisible light source. Can be turned on and off through inputs.
An invisible light source. Can be turned on and off through inputs.
The '''light''' entity is very basic but yet essential to almost every map.
The '''light''' entity is very basic but yet essential to almost every map.


==Entity Values==
==Keyvalues==
===Keys===
 
* {{kv targetname}}


* '''Name''' ''targetname <target_source>''
* '''_light'''
: The name of this entity. Allows other entities in the map to trigger this one.
: <color255 + integer> The color and brightness of the light. RGB colors need to be between 0 and 255. Brightness can be higher.


* '''Brightnes''' ''red green blue brightness''
* '''style'''
: The color and brightness of the light. RGB colors need to be between 0 and 255. Brightness can be higher.
: <choices> A preset pattern of diverse flicker effects.
:{|
! Literal Value || Description
|-
| 0 || Normal
|-
| 1 || Flicker A
|-
| 2 || Slow, strong pulse
|-
| 3 || Candle A
|-
| 4 || Fast strobe
|-
| 5 || Gentle pulse
|-
| 6 || Flicker B
|-
| 7 || Candle B
|-
| 8 || Candle C
|-
| 9 || Slow strobe
|-
| 10 || Fluorescent flicker
|-
| 11 || Slow pulse, noblack
|}


* '''Appearance''' ''<choose a style>''
* '''pattern'''
: A preset pattern of diverse flicker effects.
: <string> A string of characters defining a custom pattern, '''a''' being most dark and '''z''' being most bright.


* '''Custom Appearance''' ''Example: azazazaz''
* '''_constant_attn'''
: A string of characters defining a custom pattern, '''a''' being most dark and '''z''' being most bright. Above example would be a stobe light.
: <float> Brightens or dims the intensity of the light near its entity. A '''high constant''' will dim the light.


* '''Constant'''
* '''_linear_attn'''
: Brightens or dims the intensity of the light near its entity. A '''high constant''' will dim the light.
: <float> Brightens or dims the intensity of the light emitted. A '''high linear''' will dim the light.


* '''Linear'''
* '''_quadratic_attn'''
: Similar to '''Constant''' but affects all distances.
: <float> Increase to make a light bright but not travel far.


* '''Quadratic'''
* '''_distance'''
: Increase to make a light bright but not travel far.
: <integer> Stops the light emitted from reaching beyond this distance. Useful in cutting down compiling time by not making lights extend infinitely.


* '''Maximum distance'''
==Flags==
: Stops the light emitted from reaching beyond this distance. Useful in cutting down compiling time by not making lights extend infinitely.


===Flags===
* 1 : Initially Off


* '''Initially Dark'''
==Inputs==
: Causes the light to be off when the map starts.


===Inputs===
* {{kv targetname}}


* '''TurnOn'''
* '''TurnOn'''
Line 54: Line 82:
* '''FadeToPattern'''
* '''FadeToPattern'''
: Fades from the light's old pattern to the new one.
: Fades from the light's old pattern to the new one.
==Outputs==
* {{kv targetname}}


==See Also==
==See Also==

Revision as of 20:13, 11 July 2005

Template:Light

Entity Description

Entity Name: light

An invisible light source. Can be turned on and off through inputs. The light entity is very basic but yet essential to almost every map.

Keyvalues

  • _light
<color255 + integer> The color and brightness of the light. RGB colors need to be between 0 and 255. Brightness can be higher.
  • style
<choices> A preset pattern of diverse flicker effects.
Literal Value Description
0 Normal
1 Flicker A
2 Slow, strong pulse
3 Candle A
4 Fast strobe
5 Gentle pulse
6 Flicker B
7 Candle B
8 Candle C
9 Slow strobe
10 Fluorescent flicker
11 Slow pulse, noblack
  • pattern
<string> A string of characters defining a custom pattern, a being most dark and z being most bright.
  • _constant_attn
<float> Brightens or dims the intensity of the light near its entity. A high constant will dim the light.
  • _linear_attn
<float> Brightens or dims the intensity of the light emitted. A high linear will dim the light.
  • _quadratic_attn
<float> Increase to make a light bright but not travel far.
  • _distance
<integer> Stops the light emitted from reaching beyond this distance. Useful in cutting down compiling time by not making lights extend infinitely.

Flags

  • 1 : Initially Off

Inputs

  • TurnOn
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