Description
Creates a "beam ring point" effect.
Arguments
1 Vector posThe origin position of the effect.
2 number lifetimeHow long the effect will be drawing for, in seconds.
3 number startRadInitial radius of the effect.
4 number endRadFinal radius of the effect, at the end of the effect's lifetime.
5 number widthHow thick the beam should be.
6 number amplitudeHow noisy the beam should be.
8 table extraExtra info, all optional. A table with the following keys: (any combination)
- number speed - ?
- number spread - ?
- number delay - Delay in seconds after which the effect should appear.
- number flags- Beam flags.
- number framerate - texture framerate.
- string material - The material to use instead of the default one.
Example
effects.
BeamRingPoint(
Entity(
1):
GetEyeTrace().HitPos
+ Vector(
0,
0,
10 ),
1,
0,
200,
10,
0,
Color(
255,
255,
255 ) )
Example
function ENT:
DoExplosion()
self:
EmitSound(
"NPC_CombineBall.Explosion")
util.
ScreenShake(
self:
GetPos(),
20,
150,
1,
1250)
local data
= EffectData()
data:
SetOrigin(
self:
GetPos())
util.
Effect(
"cball_explode",data)
effects.
BeamRingPoint(
self:
GetPos(),
0.2,
12,
1024,
64,
0,
Color(
255,
255,
225,
32),
{
speed
=0,
spread
=0,
delay
=0,
framerate
=2,
material
="sprites/lgtning.vmt"
})
effects.
BeamRingPoint(
self:
GetPos(),
0.5,
12,
1024,
64,
0,
Color(
255,
255,
225,
64),
{
speed
=0,
spread
=0,
delay
=0,
framerate
=2,
material
="sprites/lgtning.vmt"
})
self:
Remove()
end Output: Very closely emulates a Combine Ball explosion.