Env laser

From Valve Developer Community
Jump to navigation Jump to search

Template:Wrongtitle Template:Base point

Env_lasers in action.

Template:In code

Entity Description

An entity that creates a laser beam between itself and a given target. It is somewhat similar to env_beam. If you are wondering why your env_laser entity dousn't damage you, first make sure that the "damage per second" value is not set to zero then you have to make sure that the centerpoint of the env laser in hammer is not inside a brush also make sure that the center of the env_laser is not on the edge of a brush in both those cases the damage is negated by the brushes.

To move a brush / entity very slightly so the centerpoint dousn't intersect with the side of a wall anymore use "<ctrl> M" quickkey for hammer it opens up a small window. click on Move!!!!! and then click on the desired direction x y or z then fill in a value of either 0.01 or -0.01 to place the brush slightly off the grid by only a fraction... If you are still planning on moving these brushes afterwards do this when your map is finished becouse if you move these entity's together with other parts of your map they might all get off the grid which isn't good for optimisation.

If your env_laser doesn't have a targetname the "start on" flag dousn't have to be set since it starts automatically. If the env_laser does have a targetname you do need the "start on" flag if you want it to start when the map spawns.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Render FX (renderfx) <byte choices>
Various somewhat legacy alpha effects. See render effects.
  • 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

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/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 the the movement hierarchy, leaving it free to move independently.
  • TurnOn
Turns the laser on.
  • TurnOff
Turns the laser off.
  • Toggle
Toggles the laser between on and off.

Outputs