Env laser

From Valve Developer Community

This point-based entity is available in all Source games. In code it is represented by class CEnvLaser (http://localhost/class_c_env_laser.html), defined in EnvLaser.cpp (http://localhost/_env_laser_8cpp-source.html).

Table of contents

Entity Description

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

Keyvalues

Defines the name that other entities refer to this entity by.
  • hammerid [Episode Two Update]
<integer readonly> This id is used for debugging purposes in Hammer.
Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
  • renderfx
<choices>
Literal Value Description
0 Normal
1 Slow Pulse
2 Fast Pulse
3 Slow Wide Pulse
4 Fast Wide Pulse
5 Slow Fade Away
6 Fast Fade Away
7 Slow Become Solid
8 Fast Become Solid
9 Slow Strobe
10 Fast Strobe
11 Faster Strobe
12 Slow Flicker
13 Fast Flicker
14 Constant Glow
15 Distort
16 Hologram (Distort + fade)
17 Scale up
22 Spotlight FX
23 Cull By Distance (TEST)
24 Fade Wider Pulse
  • 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

  • Kill
Removes this entity from the world.
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 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Changes the entity's parent in the movement hierarchy.
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
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

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator