Env beam: Difference between revisions
Gatelych83 (talk | contribs) m (→Entity description: Added code class) |
(→Flags: Stipulating based on personal experience.) |
||
Line 62: | Line 62: | ||
:When the beam has died, it will strike again randomly within a delay interval of 0 to the value in ''Strike again time (secs)''. | :When the beam has died, it will strike again randomly within a delay interval of 0 to the value in ''Strike again time (secs)''. | ||
* 8 : Ring | * 8 : Ring | ||
:Uses the starting and ending points as a diameter, drawing a beam ring between them instead of a straight line. {{note|''info_target''s cannot be used for ring beams; the ring will not show at all. Instead, use brush entities (like [[func_brush]]es or [[func_train]]s) or models.}} | :Uses the starting and ending points as a diameter, drawing a beam ring between them instead of a straight line. {{note|''info_target''s cannot be used for ring beams; the ring will not show at all. Instead, use brush entities (like [[func_brush]]es or [[func_train]]s) or models.}} That being said, the entities should be separate ones, meaning the env_beam ''must'' act as a manager for the 2 ring beam endpoints rather than as one of them. | ||
{{note|Flag does not seem to work properly. You may have to create a ring laser out of multiple env_beams and info_targets instead, with the use of a brush cylinder for reference.}} | {{note|Flag does not seem to work properly. You may have to create a ring laser out of multiple env_beams and info_targets instead, with the use of a brush cylinder for reference.}} | ||
* 16 : StartSparks | * 16 : StartSparks |
Revision as of 16:56, 13 July 2018
Entity description
It creates a visible energy beam running between two entities, in either a line or ring shape. Similar to env_laser.
Usage Notes
Start and end points should (ideally) be info_targets, though almost any entity is acceptable, with the exception of info_null (which is removed during map compile), and entities that cannot be named (prop_static, func_detail and prop_detail). If both / all start and end point entities are destroyed in-game, the beam will no longer work.
Developers can specify a group of multiple starting / ending entities by giving them the same name. The env_beam will then randomly select one of these entities to use for each strike. If entity names for either points is omitted, a random point on a solid surface within the radius (specified in its Radius property) will be selected for each strike instead. If both points are omitted, the center will be the env_beam entity itself. Such randomized beams do not cause damage.
The beam will always visibly run from start to end, even through solid brushes. However, beam damage will be absorbed by the first solid thing it hits, such as props, players, or solid brushes. When blocked in this manner, a striking env_beam (Life > 0) will immediately discharge all damage upon impact of each strike (which means that players can walk into a beam strike after impact and not take damage), while a permanent beam (Life = 0) will inflict damage gradually.
Keyvalues
- Radius ([todo internal name (i)]) <integer>
- If the LightningStart and/or LightningEnd values are omitted, this radius determines the area within which the endpoints will randomly strike. A new random position will be appointed for every strike.
- Life (seconds 0 = infinite) ([todo internal name (i)]) <string>
- Amount of time before the beam dies. Setting to zero will make the beam stay forever.
- Width of beam ([todo internal name (i)]) <float>
- Pixel width of the beam. Range: 1 to MAX_BEAM_WIDTH.
- Amount of noise (0-255) ([todo internal name (i)]) <float>
- The amount of noise in the beam. 0 is a perfectly straight beam. Range: 0 to MAX_BEAM_NOISEAMPLITUDE.

- Texture Scroll Rate (0-100) ([todo internal name (i)]) <integer>
- Rate at which the beam texture should scroll along the beam. Range: 0 to MAX_BEAM_SCROLLSPEED.
- Frames per 10 seconds ([todo internal name (i)]) <integer>
- Framerate at which the beam texture should animate, if it has multiple frames.
- Strike again time (secs) ([todo internal name (i)]) <string>
- Refire time between random strikes of the beam. Only used if the 'Random Strike' spawnflag is set.
- Damage / second ([todo internal name (i)]) <string>
- How much damage this beam does per second to things it hits when it is continually on, or instantaneously if it strikes. For continuous damage, the value should be greater than 10 or it may not work.

- The "Easy" (
skill 1
) setting causes 50% of the Damage / second value. - The "Normal" (
skill 2
) setting causes 100% of the Damage / second value. - The "Hard" (
skill 3
) setting causes 150% of the Damage / second value.
- Start Entity ([todo internal name (i)]) <targetname>
- Entity that the beam starts at. If omitted the entity will instead use a random position on any surface within its Radius value. A new random position will be appointed for every strike. See usage note above.
- Ending Entity ([todo internal name (i)]) <targetname>
- Entity that the beam ends at. If omitted the entity will instead use a random position on any surface within its Radius value. A new random position will be appointed for every strike. See usage note above.
- HDR color scale. ([todo internal name (i)]) <float>
- float value to multiply sprite color by when running in HDR mode.
- Touch Type (tripwire) ([todo internal name (i)]) <choices>
- If you want the beam to fire an output when touched by entities, choose the entity type here.
- 0 : Not a tripwire
- 1 : Player Only
- 2 : NPC Only
- 3 : Player or NPC
- 4 : Player or NPC or Physprop
- Filter Name ([todo internal name (i)]) <filter>
- Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
- Endpoint handle ([todo internal name (i)]) <vector> (in all games since
)
- If a LightningEnd entity is not specified, use this point as the destination instead. If the env_beam moves, the destination point will move along with it.
- Beam clipping ([todo internal name (i)]) <choices> (in all games since
)
- Select whether you want the beam to clip against geometry or characters
- 0 : Do not clip (default)
- 1 : Clip to geometry
- 2 : Clip to everything solid
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- 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.
Flags
- 1 : Start On
- Starts the map with the beam turned on.
- 2 : Toggle
- Obsolete. Replaced by the Toggle input of the Source I/O system. Used to toggle the beam on and off.
- 4 : Random Strike
- When the beam has died, it will strike again randomly within a delay interval of 0 to the value in Strike again time (secs).
- 8 : Ring
- Uses the starting and ending points as a diameter, drawing a beam ring between them instead of a straight line. That being said, the entities should be separate ones, meaning the env_beam must act as a manager for the 2 ring beam endpoints rather than as one of them.
Note:info_targets cannot be used for ring beams; the ring will not show at all. Instead, use brush entities (like func_brushes or func_trains) or models.

- 16 : StartSparks
- Every time the beam strikes or is turned on, the beam temporarily emits a small shower of sparks at its Start Entity.
- 32 : EndSparks
- Every time the beam strikes or is turned on, the beam temporarily emits a small shower of sparks at its Ending Entity.
- 64 : Decal End
- Places a decal scorch mark where a damaging beam hits the first solid (world brush or entity). Refer to the "Decal Name" keyvalue to set the decal you wish to appear at the end of the beam.
- 128 : Shade Start
- The beam fades out toward its Start Entity. Overrides Shade End. Does not work on striking beams or beam rings.
- 256 : Shade End
- The beam fades out toward its Ending Entity. Is overridden by Shade Start. Does not work on striking beams (Life > 0) or beam rings.
- 512 : Taper Out
- Makes the beam taper out into a point towards its Ending Entity. Does not work on striking beams (Life > 0) or beam rings.
Inputs
- TurnOn
- Turns the beam on.
- TurnOff
- Turns the beam off.
- Toggle
- Toggles the beam between on and off.
- StrikeOnce
- Causes the beam to strike once. It will stay on for its set Life and then turn off (it will never turn off if Life is set to zero).
- Alpha <integer >
- Sets the beam's alpha (0 - 255).
- Color <color255 >
- Sets the beam's render color (R G B).
- ColorRedValue <float >
- Sets the red color channel's value (0 - 255).
- ColorGreenValue <float >
- Sets the green color channel's value (0 - 255).
- ColorBlueValue <float >
- Sets the blue color channel's value (0 - 255).
- Amplitude <float >
- Set the amplitude of beam noise (0 - 255).
- ScrollSpeed <float >
- Set the scroll speed in units per second (0 - 100).
- Width <float >
- Set the width of the beam, in pixels.
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <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 <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.
Outputs
- OnTouchedByEntity
- Fired when an entity touches the beam. Only fired if the entity passes the 'Touch Type' choice.