func_light

XashXT

func_light

A light source.

Spawnflag

SF_LIGHT_START_ON 1 (initially turned on)

Options

health Controls the lamp toughness and whether it is breakable. 0 means unbreakable.
delay How many seconds it takes the lamp to fully turn on. During this time it will flicker, simulating a fluorescent lamp.

Usage Details

  • This light source is static and precompiled. It will not follow your lamp about the level. Make sure the light-emitting texture is included in the global lights.rad file or in the info_texlights entity.
  • A lamp will not sustain any damage unless the name of your texture starts with the ~ character or the +0~ sequence.
  • The < prefix lets you break a lamp with a script even if its health option is set to zero.
  • A broken lamp cannot be turned on again. When broken, a lamp can flicker randomly for some time.
  • Note that for a light-emitting texture it is best to use a combination of +0~ and +A~ textures, where the +A~ is a copy of the texture in a turned-off state. The reverse combination will not work, because the compiler gets information about a texture's emission from the one that is specified explicitly.
  • A lamp takes the delay and activation type into account when activating what is in the target field. This means that the + prefix is passed for a turn-on activation, and the - prefix for a turn-off activation. If a lamp gets broken, the - prefix is also passed.

Limitations

  • Do not place more than 3 lamps close together, because this would exceed the light style limit in the map and some light sources would look wrong in certain combinations. The compiler shows a message like the following in this situation: “Too many light styles on a face”.
  • This entity works correctly only with those compilers that are shipped with the Xash mod and located in the devkit folder.