Env beam: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added info, needs formatting)
 
No edit summary
Line 1: Line 1:
env_beam
{{wrongtitle|title=env_beam}}
 
==Entity Description==
An entity that creates a visible beam between two points. The points can be attached to entities to make the beam move around.
An entity that creates a visible beam between two points. The points can be attached to entities to make the beam move around.
 
==Keyvalues==
KEYS
* {{kv targetname}}
 
* {{kv parentname}}
Name targetname <target_source> The name that other entities refer to this entity by.
* '''renderfx'''
 
: <choices>
Parent parentname <target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
* '''renderamt'''
 
: <[[byte]]> Useless when set to 0
Render FX renderfx <choices>  
* '''rendercolor'''
 
: {{color}} Beam Color (R G B)
Brightness (1 - 255) renderamt <integer>  
* '''Radius'''
 
: <integer> If the 'Random Strike' spawnflag is set, this radius determines the area within which the endpoints will randomly strike.
Beam Color (R G B) rendercolor <color255>
* '''life'''
 
: <unsigned integer> Amount of time before the beam dies. Setting to zero will make the beam stay forever.
Radius Radius <integer> If the 'Random Strike' spawnflag is set, this radius determines the area within which the endpoints will randomly strike.
* '''BoltWidth'''
 
: <float> Width of the beam. Range: 1 to [[MAX_BEAM_WIDTH]]
Life (seconds 0 = infinite) life <string> Amount of time before the beam dies. Setting to zero will make the beam stay forever.
* '''NoiseAmplitude'''
 
: <float> The amount of noise in the beam. 0 is a perfectly straight beam. Range: 0 to [[MAX_BEAM_NOISEAMPLITUDE]]
Width of beam BoltWidth <float> Pixel width of the beam.
* '''texture'''
 
: <sprite> The material used to draw the beam.
Amount of noise (0-255) NoiseAmplitude <float> The amount of noise in the beam. 0 is a perfectly straight beam.
* '''TextureScroll'''
 
: <integer> Rate at which the beam texture should scroll along the beam. Range: 0 to [[MAX_BEAM_SCROLLSPEED]]
Sprite Name texture <sprite> The material used to draw the beam.
* '''framerate'''
 
: <integer> Framerate at which the beam texture should animate, if it has multiple frames.
Texture Scroll Rate (0-100) TextureScroll <integer> Rate at which the beam texture should scroll along the beam.
* '''framestart'''
 
: <integer> The frame to start the beam texture on.
Frames per 10 seconds framerate <integer> Framerate at which the beam texture should animate, if it has multiple frames.
* '''StrikeTime'''
 
: <float> Refire time between random strikes of the beam. Only used if the 'Random Strike' spawnflag is set.
Starting Frame framestart <integer> The frame to start the beam texture on.
* '''damage'''
 
: <float> 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.
Strike again time (secs) StrikeTime <string> Refire time between random strikes of the beam. Only used if the 'Random Strike' spawnflag is set.
* '''LightningStart'''
 
: <target_destination> Entity that the beam starts at.
Damage / second damage <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.
* '''LightningEnd'''
 
: <target_destination> Entity that the beam ends at.
Start Entity LightningStart <target_destination> Entity that the beam starts at.
* '''TouchType'''
 
: <choices> If you want the beam to fire an output when touched by entities, choose the entity type here.
Ending Entity LightningEnd <target_destination> Entity that the beam ends at.
:{|
 
! Literal Value || Description
spawnflags spawnflags <flags>
|-
 
| 0 || Not a tripwire
Touch Type (tripwire) TouchType <choices> If you want the beam to fire an output when touched by entities, choose the entity type here.
|-
 
| 1 || Player Only
Filter Name filtername <filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
|-
 
| 2 || NPC Only
 
|-
INPUTS
| 3 || Player or NPC
 
|-
Kill Removes this entity from the world.
| 4 || Player or NPC or Physprop
 
|}
KillHierarchy Removes this entity and all its children from the world.
* '''filtername'''
 
: <filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
==Inputs==
 
* {{i targetname}}
FireUser1 Causes this entity's OnUser1 output to be fired.
* {{i parentname}}
 
* '''TurnOn'''
FireUser2 Causes this entity's OnUser2 output to be fired.
: Turns the beam on.
 
* '''TurnOff'''
FireUser3 Causes this entity's OnUser3 output to be fired.
: Turns the beam off.
 
* '''Toggle'''
FireUser4 Causes this entity's OnUser4 output to be fired.
: Toggles the beam's state.
 
* '''StrikeOnce'''
SetParent <string> Changes the entity's parent in the movement hierarchy.
: 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>'''
SetParentAttachment <string> Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
: Sets the renderamt
 
* '''Color {{color}}'''
ClearParent Removes this entity from the the movement hierarchy, leaving it free to move independently.
: Sets the rendercolor
 
* '''Amplitude <float>'''
TurnOn Turns the beam on.
: Set the NoiseAmplitude
 
* '''ScrollSpeed <float>'''
TurnOff Turns the beam off.
: Set the TextureScroll
 
* '''Width <float>'''
Toggle Toggles the beam between on and off.
: Set the BoltWidth
 
==Outputs==
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).
* {{o targetname}}
 
* '''OnTouchedByEntity'''
Alpha <integer> Sets the beam's alpha (0 - 255).
: Fired when an entity touches the beam. Only fired if the entity passes the 'Touch Type' choice. Check out [[Targetname]] read up on how to trigger the activator.
 
==See Also==
Color <color255> Sets the beam's render color (R G B).
* [http://www.akilling.org/akg/tutorials/wiseLaser.asp A little fun with env_beam]
 
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.
 
 
OUTPUTS
 
OnUser1 Fired in response to FireUser1 input.
 
OnUser2 Fired in response to FireUser2 input.
 
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.
 
OnTouchedByEntity Fired when an entity touches the beam. Only fired if the entity passes the 'Touch Type' choice.
 
''A little fun with'' [http://www.akilling.org/akg/tutorials/wiseLaser.asp env_beam]

Revision as of 17:04, 16 August 2005

Template:Wrongtitle

Entity Description

An entity that creates a visible beam between two points. The points can be attached to entities to make the beam move around.

Keyvalues

<choices>
  • renderamt
<byte> Useless when set to 0
  • rendercolor
#000000 Beam Color (R G B)
  • Radius
<integer> If the 'Random Strike' spawnflag is set, this radius determines the area within which the endpoints will randomly strike.
  • life
<unsigned integer> Amount of time before the beam dies. Setting to zero will make the beam stay forever.
  • BoltWidth
<float> Width of the beam. Range: 1 to MAX_BEAM_WIDTH
  • NoiseAmplitude
<float> The amount of noise in the beam. 0 is a perfectly straight beam. Range: 0 to MAX_BEAM_NOISEAMPLITUDE
  • texture
<sprite> The material used to draw the beam.
  • TextureScroll
<integer> Rate at which the beam texture should scroll along the beam. Range: 0 to MAX_BEAM_SCROLLSPEED
  • framerate
<integer> Framerate at which the beam texture should animate, if it has multiple frames.
  • framestart
<integer> The frame to start the beam texture on.
  • StrikeTime
<float> Refire time between random strikes of the beam. Only used if the 'Random Strike' spawnflag is set.
  • damage
<float> 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.
  • LightningStart
<target_destination> Entity that the beam starts at.
  • LightningEnd
<target_destination> Entity that the beam ends at.
  • TouchType
<choices> If you want the beam to fire an output when touched by entities, choose the entity type here.
Literal Value Description
0 Not a tripwire
1 Player Only
2 NPC Only
3 Player or NPC
4 Player or NPC or Physprop
  • filtername
<filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.

Inputs

Turns the beam on.
  • TurnOff
Turns the beam off.
  • Toggle
Toggles the beam's state.
  • 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 renderamt
  • Color #000000
Sets the rendercolor
  • Amplitude <float>
Set the NoiseAmplitude
  • ScrollSpeed <float>
Set the TextureScroll
  • Width <float>
Set the BoltWidth

Outputs

Fired when an entity touches the beam. Only fired if the entity passes the 'Touch Type' choice. Check out Targetname read up on how to trigger the activator.

See Also