env_laser
Jump to navigation
Jump to search
- Not to be confused with env_portal_laser.
Code classes:
CEnvLaser
CBeam
CBaseEntity
(all ents)
env_laser
is a point entity present in all Source games. It creates a laser beam between itself and a given target. The main difference between this entity and env_beam
is that a laser will not travel through anything solid.
Tip: If the laser doesn't cause damage, make sure the origin is not inside anything solid.
Note: If your env_laser
doesn't have a targetname it will automatically be turned on when the map starts.
Keyvalues[edit | edit source]
- Width of beam
(BoltWidth)
<float>
- Radius of the beam (i.e. 1 = 2 world units total thickness). The FGDs say this is measured in pixels and that's false.[Confirmed]
- Amount of noise
(NoiseAmplitude)
<float>
- The amount of noise in the beam. 0 is a perfectly straight beam, and high values are very jagged.
- Texture Scroll Rate
(TextureScroll)
<integer>
- Rate at which the beam texture should scroll along the laser.
- Sprite Name
(texture)
<sprite>
- The material used to draw the laser. Important: Remember to add the texture's file extension to the end, to prevent crashes and other bugs.
- Target of Laser
(LaserTarget)
<target_destination>
- The laser's endpoint. This is required.
- End Sprite
(EndSprite)
<sprite>
- If specified, this sprite will be drawn at the end of the laser.
- Starting Frame
(framestart)
<integer>
- The frame to start the laser texture on.
Inputs[edit | edit source]
- TurnOn
- Turns the beam on.
- TurnOff
- Turns the beam off.
- Toggle
- If on, turn off. If off, turn on.