func_tankpulselaser
Code classes:
CFuncTankPulseLaser
CFuncTankGun
CFuncTank
CBaseEntity
(all ents)
func_tankpulselaser
is a brush entity present in some Source games. It shoots small lasers that can bounce around. Does not work in .
Bug: The visual representation of the laser disappears after it bounces. See below for a band-aid solution.
Bug: The sounds which are supposed to play when a laser bounces off something are missing. The console will list their names when they're meant to play.
Note: For EVERY shot fired, the tank creates two beam
s, a grenade_beam
, and a grenade_beam_chaser
.
Keyvalues[edit | edit source]
- Pulse Speed
(PulseSpeed)
<float>
- How fast the laser travels.
- Pulse Color
(PulseColor)
<color255>
- Color of the laser.
- Pulse Width
(PulseWidth)
<float>
- Width of the laser.
- Pulse Life
(PulseLife)
<float>
- How long the laser can exist before removing itself.
- Pulse Lag
(PulseLag)
<float>
- How far the end of the laser is behind the front.
- Pulse Fire Sound
(PulseFireSound)
<sound>
- Sound to play when the gun is fired.
How to stop ricocheting[edit | edit source]
Make two filter_activator_class
es set to allow the classnames grenade_beam
and grenade_beam_chaser
.
Make a filter_multi
and set its filters to the names of the filter_activator_class
es.
Make a trigger_multiple
over a surface. How far away it extends from the surface depends on how fast the laser can move. If the trigger doesn't go out far enough, the laser will flicker. Set its Filter Name (filtername)
to the name of the filter_multi
. Set the flags to Everything then give it this output:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once |
---|---|---|---|---|---|
OnStartTouch | !activator | Kill | 0.10 | No |