Nuclide
Software Development Kit for id Technology
env_beam Class Reference

About this class

Shared-Entity: Beam/Lightning Emitter.

QUAKED env_beam (1 .5 0) (-8 -8 -8) (8 8 8) BEAM_STARTON BEAM_TOGGLE BEAM_RANDOMSTRIKE BEAM_RING BEAM_STARTSPARKS BEAM_ENDSPARKS BEAM_DECAL BEAM_SHADESTART BEAM_SHADEEND

OVERVIEW

Controllable beam effect, akin to lightning. Also known as env_lightning.

KEYS

  • "targetname" : Name
  • "LightningStart" : Targetname of the entity that acts as starting point for the beam.
  • "LightningEnd" : Targetname of the entity that acts as an ending point for the beam.
  • "Radius" : If either start/end point is undefined, it'll pick the nearest surface in this specified radius as start/end points.
  • "life" : Lifetime of the beam in seconds.
  • "StrikeTime" : Time in seconds before the beam reactivates.
  • "damage" : Damage per second that's dealt when touching the inner beam.
  • "texture" : Path to the sprite to use in place of a texture.
  • "BoltWidth" : Thickness multiplier. 0-255 range.
  • "NoiseAmplitude" : Amplitude multiplier. 0-255 range.

SPAWNFLAGS

  • BEAM_STARTON (1) : Activate the beam at map start.
  • BEAM_TOGGLE (2) : Beam can now be toggled off, else StrikeTime + life keys take over.
  • BEAM_RANDOMSTRIKE (4) : Use variations in StrikeTime + life keys when set.
  • BEAM_RING (8) : Instead of a beam, two points will connect into a ring.
  • BEAM_STARTSPARKS (16) : TODO: Start of the beam will spark when set.
  • BEAM_ENDSPARKS (32) : TODO: End of the beam will spark when set.
  • BEAM_DECAL (64) : TODO: Presumably leaves decals when sparks hit a surface.
  • BEAM_SHADESTART (128) : Beam will fade towards the start point when set.
  • BEAM_SHADEEND (256) : Beam will fade towards the end point when set.

TRIVIA

This entity was introduced in Half-Life (1998).

Inheritance diagram for env_beam:
NSRenderableEntity

Public Member Functions

void env_beam (void)
 
virtual void Respawn (void)
 Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state. More...
 
virtual void SpawnKey (string, string)
 This method handles entity key/value pairs on map load. More...
 
virtual void EvaluateEntity (void)
 Run each tic after physics are run to determine if we need to send updates over the network. More...
 
virtual float SendEntity (entity, float)
 Called by the engine whenever we need to send a client an update about this entity. More...
 
virtual void Trigger (entity, triggermode_t)
 Called whenever we're legacy triggered by another object or function. More...
 
virtual void Input (entity, string, string)
 Called when we are being prompted by another object/function with an input message. More...
 
nonvirtual void CastLaser (void)
 
nonvirtual void LaunchBeam (void)
 
nonvirtual void EndBeam (void)
 
nonvirtual void StopBeam (void)
 
nonvirtual void FindLocation (void)
 

Constructor & Destructor Documentation

◆ env_beam()

void env_beam::env_beam ( void  )

Member Function Documentation

◆ CastLaser()

void env_beam::CastLaser ( void  )

◆ EndBeam()

void env_beam::EndBeam ( void  )

◆ EvaluateEntity()

void env_beam::EvaluateEntity ( void  )
virtual

Run each tic after physics are run to determine if we need to send updates over the network.

Reimplemented from NSRenderableEntity.

◆ FindLocation()

void env_beam::FindLocation ( void  )

◆ Input()

void env_beam::Input ( entity  eAct,
string  strInput,
string  strData 
)
virtual

Called when we are being prompted by another object/function with an input message.

Reimplemented from NSRenderableEntity.

◆ LaunchBeam()

void env_beam::LaunchBeam ( void  )

◆ Respawn()

void env_beam::Respawn ( void  )
virtual

Server: Called when the entity first spawns or when game-logic requests the entity to return to its original spawn state.

Reimplemented from NSRenderableEntity.

◆ SendEntity()

float env_beam::SendEntity ( entity  ,
float   
)
virtual

Called by the engine whenever we need to send a client an update about this entity.

Reimplemented from NSRenderableEntity.

◆ SpawnKey()

void env_beam::SpawnKey ( string  strKey,
string  strValue 
)
virtual

This method handles entity key/value pairs on map load.

You can easily convert the strValue parameter using the ReadFloat etc. methods that are part of NSIO.

Reimplemented from NSRenderableEntity.

◆ StopBeam()

void env_beam::StopBeam ( void  )

◆ Trigger()

void env_beam::Trigger ( entity  act,
triggermode_t  state 
)
virtual

Called whenever we're legacy triggered by another object or function.

Reimplemented from NSTrigger.


The documentation for this class was generated from the following file: