Difference between revisions of "Env beam"
(Import of converted entguide pages from Sven Manor.) |
Outerbeast (talk | contribs) m |
||
(2 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
}} | }} | ||
− | The env_beam entity is used to create a bolt between two entities. | + | The env_beam entity is used to create a bolt between two entities. The actual beam has the classname <code>beam</code>. |
== Keyvalues == | == Keyvalues == | ||
Line 13: | Line 13: | ||
{{Entity_keyvalue|Radius|Radius|Maximum distance from the start entity or env_beam, depending on how you have set it up, to the destination of a random strike. Note that this kind of random strike has nothing to do with the flag 'Random strike', which only affects the timing.}} | {{Entity_keyvalue|Radius|Radius|Maximum distance from the start entity or env_beam, depending on how you have set it up, to the destination of a random strike. Note that this kind of random strike has nothing to do with the flag 'Random strike', which only affects the timing.}} | ||
{{Entity_keyvalue|Life|life|Time, in seconds, the beam/bolt will be visible after being triggered. A value of '0' makes it last forever.}} | {{Entity_keyvalue|Life|life|Time, in seconds, the beam/bolt will be visible after being triggered. A value of '0' makes it last forever.}} | ||
− | {{Entity_keyvalue|Width of beam|BoltWidth|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. | + | {{Entity_keyvalue|Width of beam|BoltWidth|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.}} |
− | |||
{{Entity_keyvalue|Amount of noise|NoiseAmplitude|Set how much the bolt shivers on a scale from 0 (not at all) to 255 (very much).}} | {{Entity_keyvalue|Amount of noise|NoiseAmplitude|Set how much the bolt shivers on a scale from 0 (not at all) to 255 (very much).}} | ||
{{Entity_keyvalue|Sprite name|texture|Set the sprite to use to display the bolt. Path starts in mod-folder.}} | {{Entity_keyvalue|Sprite name|texture|Set the sprite to use to display the bolt. Path starts in mod-folder.}} | ||
Line 28: | Line 27: | ||
{{Entity_flag|2|Toggle|Causes the env_beam entity to be toggleable instead of causing just one temporary beam when triggered.}} | {{Entity_flag|2|Toggle|Causes the env_beam entity to be toggleable instead of causing just one temporary beam when triggered.}} | ||
{{Entity_flag|4|Random strike|If the 'Toggle'-flag is set along with this, this causes the env_beam's delay till striking again to be a random number between zero and the 'Strike again time'-value you specified.}} | {{Entity_flag|4|Random strike|If the 'Toggle'-flag is set along with this, this causes the env_beam's delay till striking again to be a random number between zero and the 'Strike again time'-value you specified.}} | ||
− | {{Entity_flag|8|Ring|Set it to form a circled beam which uses start and end point as the ring's intersection points, with the ring's center being | + | {{Entity_flag|8|Ring|Set it to form a circled beam which uses start and end point as the ring's intersection points, with the ring's center being in the middle between them. This requires start and end entity to be brush entities. Use of two func_trains with origin brushes is encouraged, as that is seen in the Half-Life single player! The ring always aligns itself to lie on the horizon of either of the two points looking at the other in respect to the z-axis.}} |
− | in the middle between them. This requires start and end entity to be brush entities. Use of two func_trains with origin brushes | ||
− | is encouraged, as that is seen in the Half-Life single player! The ring always aligns itself to lie on the horizon of either of the two points looking at the other in respect to the z-axis.}} | ||
{{Entity_flag|16|Start sparks|If set, sparks will be emitted at the start entity.}} | {{Entity_flag|16|Start sparks|If set, sparks will be emitted at the start entity.}} | ||
{{Entity_flag|32|End sparks|If set, sparks will be emitted at the end entity.}} | {{Entity_flag|32|End sparks|If set, sparks will be emitted at the end entity.}} | ||
− | {{Entity_flag|64|Decal end|If set, a | + | {{Entity_flag|64|Decal end|If set, a bullet hole decal will be created whenever the beam hits a surface.}} |
{{Entity_flag|128|Shade start|If set, the beam will fade invisible towards the start point.}} | {{Entity_flag|128|Shade start|If set, the beam will fade invisible towards the start point.}} | ||
{{Entity_flag|256|Shade end|If set, the beam will fade invisible towards the end point.}} | {{Entity_flag|256|Shade end|If set, the beam will fade invisible towards the end point.}} | ||
Line 39: | Line 36: | ||
== Notes == | == Notes == | ||
− | In case multiple entities match the name specified under start- and/or end-entity, the env_beam entity will pick one randomly each for every beam created.Of the 'Shade start'- and 'Shade end'-flag, you may select one or neither. Using both makes only one function.Ring-beams cannot have 'Shade start' nor 'Shade end' by design.Contrary to what you may have read elsewhere, it is not possible to alter how fine a beam 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 startpoint, endpoint and beam-width.When turning off a toggleable env_beam entity, its bolts will remain active until they run out of the specified lifetime, unless they are infinite. When reactivated, the next new beam will be created immediately, regardless of when the last one was created.Setting "Sprite name" to 'sprite_01.spr' with moderate "Amount of Noise" makes it look like magical (but not too pretty) fairy. | + | * In case multiple entities match the name specified under start- and/or end-entity, the env_beam entity will pick one randomly each for every beam created. |
+ | * Of the 'Shade start'- and 'Shade end'-flag, you may select one or neither. Using both makes only one function. | ||
+ | * Ring-beams cannot have 'Shade start' nor 'Shade end' by design. | ||
+ | * Contrary to what you may have read elsewhere, it is not possible to alter how fine a beam 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 startpoint, endpoint and beam-width. | ||
+ | * When turning off a toggleable env_beam entity, its bolts will remain active until they run out of the specified lifetime, unless they are infinite. When reactivated, the next new beam will be created immediately, regardless of when the last one was created. | ||
+ | * Setting "Sprite name" to 'sprite_01.spr' with moderate "Amount of Noise" makes it look like magical (but not too pretty) fairy. | ||
− | + | == Issues == | |
+ | |||
+ | * Ring-beams with infinite lifetime do not react to getting triggered off. | ||
+ | * If the 'Ring'-flag is set, damage will be applied as if the beam still was linear. (Only on a line between start and end point) | ||
+ | * Non-moving ring-beams with infinite lifetime occasionally disappear for specific clients completely. Set a lifetime of e.g. one second and a 'Strike again time'-value of '0' to encounter this issue. | ||
+ | * Ring-beams always apply damage as if they were temporary beams. (In moment of creation) | ||
+ | * Beams with limited lifetime cannot have 'Shade start' nor 'Shade end'. | ||
+ | * Non-toggleable env_beams act as toggleable env_beams do, except that they can never be turned off again. | ||
+ | * Setting a Render FX makes no change whatsoever. | ||
== Changes == | == Changes == | ||
− | 5.10 Steam Release: Now supports framerate key. | + | * 5.10 Steam Release: Now supports framerate key. |
{{entity_title}} | {{entity_title}} |
Latest revision as of 14:14, 30 April 2023
env_beam | |
---|---|
Type |
point |
Status |
supported |
The env_beam entity is used to create a bolt between two entities. The actual beam has the classname beam
.
1 Keyvalues
Start entity : LightningStart
Entity at which the beam starts. If this and the end entity are not set, the env_beam entity will cast a random bolt hitting a solid surface in the specified radius around itself. This is not guaranteed to work unless there are solid faces in every direction from the env_beam entity within the specified radius.
End entity : LightningEnd
Entity at which the beam ends. If this is not set, the env_beam entity will cast a random bolt hitting a solid surface in the specified radius the start entity. This is not guaranteed to work unless there are solid faces in every direction from the start entity within the specified radius.
Brightness : renderamt
Set how bright/visible/transparent the beam shall be on a scale from '0' (invisible) to '255' (very bright).
Beam color : rendercolor
Set the beam's color. Note that, because of bolts being rendered additively, darker colors mean greater transparency.
Radius : Radius
Maximum distance from the start entity or env_beam, depending on how you have set it up, to the destination of a random strike. Note that this kind of random strike has nothing to do with the flag 'Random strike', which only affects the timing.
Life : life
Time, in seconds, the beam/bolt will be visible after being triggered. A value of '0' makes it last forever.
Width of beam : BoltWidth
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 : 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.
Texture scroll rate : TextureScroll
The texture of the beam 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.
Frames per 10 seconds : framerate
Set how often the bolt texture should be updated within ten seconds. Now correctly supported.
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.
Strike again time : StrikeTime
Time, in seconds, the env_beam entity will be idle after a bolt has run out, before creating the next one, when the 'Toggle'-flag is set. Negative values allow you to have the next beam fire before the current one runs out. However, setting a negative value that causes the next beam to be created the instant a beam is created causes an infinite amount of beams to be created, eventually causing overflows.
Damage / second : damage
Average damage per second for beams with infinite lifetime. Damage in the moment of creation for temporary beams.
2 Flags
1 : Start on
Causes the beam to be activated from map load onwards. Only makes sense in combination with the 'Toggle'-flag below.
2 : Toggle
Causes the env_beam entity to be toggleable instead of causing just one temporary beam when triggered.
4 : Random strike
If the 'Toggle'-flag is set along with this, this causes the env_beam's delay till striking again to be a random number between zero and the 'Strike again time'-value you specified.
8 : Ring
Set it to form a circled beam which uses start and end point as the ring's intersection points, with the ring's center being in the middle between them. This requires start and end entity to be brush entities. Use of two func_trains with origin brushes is encouraged, as that is seen in the Half-Life single player! The ring always aligns itself to lie on the horizon of either of the two points looking at the other in respect to the z-axis.
16 : Start sparks
If set, sparks will be emitted at the start entity.
32 : End sparks
If set, sparks will be emitted at the end entity.
64 : Decal end
If set, a bullet hole decal will be created whenever the beam hits a surface.
128 : Shade start
If set, the beam will fade invisible towards the start point.
256 : Shade end
If set, the beam will fade invisible towards the end point.
3 Notes
- In case multiple entities match the name specified under start- and/or end-entity, the env_beam entity will pick one randomly each for every beam created.
- Of the 'Shade start'- and 'Shade end'-flag, you may select one or neither. Using both makes only one function.
- Ring-beams cannot have 'Shade start' nor 'Shade end' by design.
- Contrary to what you may have read elsewhere, it is not possible to alter how fine a beam 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 startpoint, endpoint and beam-width.
- When turning off a toggleable env_beam entity, its bolts will remain active until they run out of the specified lifetime, unless they are infinite. When reactivated, the next new beam will be created immediately, regardless of when the last one was created.
- Setting "Sprite name" to 'sprite_01.spr' with moderate "Amount of Noise" makes it look like magical (but not too pretty) fairy.
4 Issues
- Ring-beams with infinite lifetime do not react to getting triggered off.
- If the 'Ring'-flag is set, damage will be applied as if the beam still was linear. (Only on a line between start and end point)
- Non-moving ring-beams with infinite lifetime occasionally disappear for specific clients completely. Set a lifetime of e.g. one second and a 'Strike again time'-value of '0' to encounter this issue.
- Ring-beams always apply damage as if they were temporary beams. (In moment of creation)
- Beams with limited lifetime cannot have 'Shade start' nor 'Shade end'.
- Non-toggleable env_beams act as toggleable env_beams do, except that they can never be turned off again.
- Setting a Render FX makes no change whatsoever.
5 Changes
- 5.10 Steam Release: Now supports framerate key.