Template:I Light

From Valve Developer Community
Jump to navigation Jump to search
TurnOn
Turn the light on (sets pattern to m).
TurnOff
The the light off (sets pattern to a).
Toggle
Toggle the light's current state.
Cpp.pngCode:Uses the current state of the m_spawnflags to determine whether to turn on or off. As such, if the light has been manually turned off (such as by setting pattern to a in SetPattern or FadeToPattern), this input will appear to have no effect.
SetPattern <string>
Set a custom pattern of light brightness for this light. Flags the light to game code as being "on".
FadeToPattern <string>
Fades from first value in old pattern, to first value in the new given pattern.
Fade occurs 0.1 seconds per letter, the same speed as the pattern itself. Flags the light to game code as being "on".
Tip.pngTip:This can be used to have a light turn on and off slowly (over the span of 1.3 seconds), by setting the pattern to m to turn on, and a to turn off.