env_laser

From Valve Developer Community

Jump to: navigation, search

This is a point entity available in all Source games. In code it is represented by class CEnvLaser, defined in EnvLaser.cpp.

Contents

Entity Description

An entity that creates a laser beam between itself and a given target. It is somewhat similar to env_beam.

Keyvalues

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • Parentname:

Parent <targetname>
Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
  • RenderFXChoices:

Render FX <choices>
Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.
  • LaserTarget
<target_destination> Name of entity, or entities, to strike at. The target is randomly chosen if there are multiple entities matching the given name.
  • renderamt
<byte> Brightness (1 - 255).
  • rendercolor
<color255> Beam Color (R G B).
  • width
<float> The width of the laser beam, in pixels.
  • NoiseAmplitude
<integer> The amount of noise in the beam. 0 is a perfectly straight beam.
  • texture
<material> The material used to draw the laser beam. (sprites/laserbeam)
  • EndSprite
<material> If specified, this sprite will be drawn at the end of the laser beam.
  • TextureScroll
<integer> Rate at which the beam texture should scroll along the beam.
  • framestart
<float> The frame to start the beam texture on.
  • damage
<float> How much damage this laser does. per second. to things it hits.
  • dissolvetype
<choices> Dissolve Type.
Literal value Description
-1 None
0 Energy
1 Heavy electrical
2 Light electrical

Flags

  • 1 : Start On
  • 16 : StartSparks
  • 32 : EndSparks
  • 64 : Decal End

Inputs

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • Parentname:

SetParent <targetname>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from its current movement hierarchy.
  • TurnOn
Turns the laser on.
  • TurnOff
Turns the laser off.
  • Toggle
Toggles the laser between on and off.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
Personal tools