env_beam
Last edited 5 years ago2019-05-13 07:29:54 UTC
- Wiki
- View Page
-
You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date.
Click here to see the current revision of this page.
The env_beam entity creates a line composed of a loop of
sprites with various effects. It is often used to create lasers or electricity.
Attributes
- Start Entity (LightningStart) - The name of an entity to be used as the starting point for the beam. If undefined, the beam will choose a surface within the Radius to use as the starting point. (Note that if the Start Entity is undefined, the Ending Entity must also be undefined.)
- Ending Entity (LightningEnd) - The name of an entity to be used as the end point for the beam. If undefined, the beam will choose a surface within the Radius to use as the end point.
- Render FX (renderfx) - Gives the beam certain visual effects.
- Normal (0) - No visual effects.
- Slow Pulse (1) - Beam slowly pulses with transparency. Faint.
- Fast Pulse (2) - Beam quickly pulses with transparency. Faint.
- Slow Wide Pulse (3) - Beam slowly pulses with transparency. Strong.
- Fast Wide Pulse (4) - Beam quickly pulses with transparency. Strong.
- Slow Fade Away (5) - Seemingly unused.
- Fast Fade Away (6) - Seemingly unused.
- Slow Become Solid (7) - Seemingly unused.
- Fast Become Solid (8) - Seemingly unused.
- Slow Strobe (9) - A very slow strobe effect between visible and invisible.
- Fast Strobe (10) - A medium strobe effect between visible and invisible.
- Faster Strobe (11) - A very fast strobe effect between visible and invisible.
- Slow Flicker (13) - Beam flickers in and out of visibility.
- Fast Flicker (13) - Beam quickly flickers in and out of visibility.
- Constant Glow (14) - Seemingly unused.
- Distort (15) - Beam has a slight fast pulsing of transparency.
- Hologram (Distort + fade) (16) - Beam has a slight fast pulsing of transparency. Fades out with distance.
- Name (targetname) - Name is a general attribute used to identify entities.
- Brightness (1 - 255) (renderamt) - Sets the transparency of the beam. Scales from 1 (invisible) to 255 (solid).
- Beam Color (R G B) (rendercolor) - Sets the colour of the beam.
- Radius (Radius) - If the beam has undefined start/end points, this attribute defines how far away the beam can choose to use as its start/end points.
- Life (seconds 0 = infinite) (life) - Sets how many seconds the beam will stay on before deactivating. It will reactivate through Strike again time. Setting this to 0 will make the beam never deactivate automatically.
- Width of beam (pixels*0.1 0-255) (BoltWidth) - Sets the width of the beam. Measured in tenths of a unit. This attribute works like a radius; the beam will actually be twice as wide as the defined value.
- Amount of noise (0-255) (NoiseAmplitude) - Sets how erratic the beam will be. The beam will always start and end at the usual points, but the path of the beam will move randomly to a degree defined by this attribute. Scales from 0 (perfectly straight beam) to 255 (wildly moving beam).
- Sprite Name (texture) - This defines which sprite file the entity will use to form the beam. This accepts an input of the form "path/filename.spr" (starting from the root folder). (Example: "sprites/laserbeam.spr").
- Texture Scroll Rate (0-100) (TextureScroll) - Sets how fast the sprites move along the beam. Scales from 0 (no movement) to 100 (extremely fast).
- Frames per 10 seconds (framerate) - Seemingly unused.
- Starting Frame (framestart) - Sets which frame of animation that the sprite should use.
- Strike again time (secs) (StrikeTime) - Sets how long many seconds before the beam reactivates (after the beam deactivates after being on for the time defined in Life). If the beam has undefined start/end points, the beam will choose new points for the reactivation.
- Damage / second (damage) - Sets how much damage the beam should do when you walk through it. Note that the damage is only dealt in a straight line between start and end point, regardless of any fluctuation in the beam from the Amount of Noise attribute.
Flags
- Start On (1) - If enabled, the beam will be turned on upon map start. Otherwise you will need to trigger the env_beam to turn it on.
- Toggle (2) - If enabled, the beam can be retriggered to stop the beam from reactivating automatically. Otherwise, the beam seems to loop indefinitely regardless of further triggerings.
- Random Strike (4) - If enabled, the beam will vary its activation and deactivation times. These times will be scaled somewhat around the times you provide in Life and Strike Again Time.
- Ring (8) - If enabled, the beam will form a ring between its two points rather than a straight line. The ring will tend towards being horizontal, and may malform if the two points are in a perfectly vertical line.
- StartSparks (16) - If enabled, the start of the beam will spark when it is activated.
- EndSparks (32) - If enabled, the end of the beam will spark when it is activated.
- Decal End (64) - Seemingly unused.
- Shade Start (128) - If enabled, the beam will fade towards the start.
- Shade End (256) - If enabled, the beam will fade towards the end. Will not function if "Shade Start" is enabled.
Notes
- info_targets are often used for stationary start/end points. To make moving beams, use func_trains.
- The fluctuation of a beam (via the Amount of noise attribute) seems to be affected by the length of the beam; longer beams will be more affected by the same noise value.
- The sprite used in the beam does not seem to animate, though if the sprite has multiple frames, you can choose which frame it uses.
- Setting Life to less than 0.1 (but greater than 0) seems to make the beam not deactivate, but will still create new beams after Strike Again Time. This can cause the beams stack up. There seems to be a limit to how many beams will generate in this way, and after a while the beams will stop spawning. Possibly could be used to create unique visual effects.
- The "Ring" flag seems to not accept all entities as start/end points, including info_targets. It will accept func_trains though.
- If multiple entities have the same name as the Start Entity / Ending Entity, the beam will randomly choose a target from those entities. This can be used to create a random function by placing buttons triggered by damage in the path of the beams.
Comments
You must log in to post a comment.
You can login or register a new account.