12-Jul-2023
A less advanced version of env_beam. Creates a toggleable laser between itself and its target.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of env_laser so other entities can trigger it to enable/disable laser. Depending on trigger use-type: 'On'- enable laser, 'Off'- disable laser, 'Toggle'- toggle laser. Can be kill-targeted.
Render FX renderfx : Set custom render FX effect. Only works when "Render Mode" is set to different than 'Normal'
Pitch Yaw Roll (X Y Z) angles : Where Z means Y and Y means Z, that is, when you're thinking Hammer-grid. (Hammer uses Z for height and Y for depth, while every other sane 3D-application does this the other way round; nonetheless this keyvalue description has the letters in the conventional order) This, technically, is a 3D-vector containing Euler-angles to describe either the entity's rotation or direction of effect. E.g. a func_door_rotating will use this as its initial rotation, while a trigger_push will keep its original alignment and use this for the direction of its push-effect instead. Euler-angles are a hierarchical system to determine an object's orientation in 3D-space. A yaw-value of 0 would mean the entity would face east. (right in top-down view) 90 would mean it would face north. (up in top-down-view) After yaw, pitch is applied. Think aiming up/down with your character in first person. At last, the roll-value is applied. Think your character falling over sideways in first person. Some entities, mostly point entities, do not use the angles keyvalue for any purpose.
Target of Laser LaserTarget : Entity at which the beam ends.
Brightness (1 - 255) renderamt : Set how bright/visible/transparent the beam shall be on a scale from '0' (invisible) to '255' (very bright).
Beam Color (R G B) rendercolor : Set the beam's color. Note that, because of bolts being rendered additively, darker colors mean greater transparency.
Width of beam (pixels0.1 0-255) width : Set the width of the bolt-/beam-texture in inches 0.25. Note that one unit in Valve Hammer Editor equals one inch and the beam texture you are using possibly has entirely transparent sides, so the beam may appear a bit thinner than expected.
Amount of noise (0-255) NoiseAmplitude : Set how much the bolt shivers on a scale from 0 (not at all) to 255 (very much).
Sprite Name texture : Set the sprite to use to display the bolt. Path starts in mod-folder.
End Sprite EndSprite : This sprite is placed where the laser beam ends.
Texture Scroll Rate (0-100) TextureScroll : The texture of the laser is not supposed to be displayed statically. Setting a texture scroll rate gives a visual effect of an actual, moving electric current. The value you set here specifies how often the texture will scroll for the length of its own height per second.
Starting Frame framestart : Set the number of the frame of the sprite to start animating at. This is rarely ever useful, e.g. when you have two identical beams next to each other and need them to look slightly different. Setting '0' here is safe.
Damage / second damage : Average damage per second for the laser.
1 : Start On : Causes the laser to be activated from map load onwards.
16 : StartSparks : If set, sparks will be emitted at the env_laser.
32 : EndSparks : If set, sparks will be emitted at the target of the laser.
64 : Decal End : If set, a bullethole decal will be created whenever the beam hits a surface.
The only thing this entity has that the env_beam doesn't is "End Sprite". Unless you need this, it's probably best to use env_beam instead.
In case multiple entities match the name specified under "Target of Laser", the env_laser entity will pick one randomly.
Contrary to what you may have read elsewhere, it is not possible to alter how fine a laser will be, as in, of how many segments it will consist.
The noise-value does not affect the area in which damage will be applied. The damage area only depends on starting point, ending point and the laser's width.
Setting a "Render FX" makes no change whatsoever.