beam_spotlight

From Source Entities
Jump to navigation Jump to search

Code classes:

beam_spotlight is a point entity present in all games since L4d.pngLeft 4 Dead. It's an effect meant to simulate a lighthouse light. It rotates and draws a beam and/or halo, depending on the viewer's relative angle.

Note: This spotlight is entirely client side, and rotation may be desynchronized between clients.

Flags[edit | edit source]

  • 1: Start On
  • 2: No Dynamic Light - This entity never provides direct lighting anyway.
  • 4: Start with Rotation On
  • 8: Reverse Direction (Default is counter-clockwise.)
  • 16: X Axis Bug: Makes the entity stop rotating.
  • 32: Y axis - Makes the entity rotate on the world's Y axis as opposed to the Z axis as normal.
  • 64: No Fog (only available in Asw.png) - Does not exist inside code.

Keyvalues[edit | edit source]

Max Rotation Speed (maxspeed) <float>
The maximum rotation speed of the spotlight, in degrees per second.
Spotlight Length (spotlightlength) <float>
Maximum spotlight length. If the beam hits something before it reaches this distance, it will artificially shrink itself.
Spotlight Width (spotlightwidth) <float>
Spotlight beam's width.
HDR color scale (HDRColorScale) <float>
Multiplier for sprite color by when running in HDR mode. All games with this entity use HDR by default anyway, and can only disable it via console command.
Halo Sprite (HaloSprite) <sprite> (only available in L4d.png)
The material that should be used for the halo.
Beam Sprite (BeamSprite) <sprite> (only available in L4d.png)
The material that should be used for the beam.
Render Amount/Transparency (renderamt) <integer>
Does not work.
Render Color (R G B) (rendercolor) <color255>
Color channel filter to add to this entity's texture(s). Bug: P2.pngCsgo-small.pngBroken for brush entities.
Minimum DX Level (mindxlevel) to Maximum DX Level (maxdxlevel) <choices> (only available in games before Left 4 Dead)
Very outdated settings. Their functionality seems to no longer be fully intact. Nearly all players will be at the highest setting anyway because DirectX 8 has been obsolete since 2002. This is still in the FGD for Alien Swarm, but it doesn't use it.
Minimum CPU Level (mincpulevel) to Maximum CPU Level (maxcpulevel) <choices>
Does not work.
Minimum GPU Level (mingpulevel) to Maximum GPU Level (maxgpulevel) <choices>
Does not work.

Inputs[edit | edit source]

LightOn
Turns the light on.
LightOff
Turns the light off.
Start
Makes the light start rotating.
Stop
Makes the light stop rotating.
Reverse
Makes the light rotate in the opposite direction.
Color <color255>
Sets the Render Color (rendercolor).
Alpha <integer>
Does nothing.

Outputs[edit | edit source]

OnLightOn
Defined, but not used inside code.
OnLightOff
Defined, but not used inside code.

See Also[edit | edit source]