Garry's Mod Wiki

effects.BeamRingPoint

  effects.BeamRingPoint( Vector pos, number lifetime, number startRad, number endRad, number width, number amplitude, table color, table extra )

Description

Creates a "beam ring point" effect.

Arguments

1 Vector pos
The origin position of the effect.
2 number lifetime
How long the effect will be drawing for, in seconds.
3 number startRad
Initial radius of the effect.
4 number endRad
Final radius of the effect, at the end of the effect's lifetime.
5 number width
How thick the beam should be.
6 number amplitude
How noisy the beam should be.
7 table color
Beam's Color.
8 table extra
Extra 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 ) )
Output:
image.png

Example

function ENT:DoExplosion() -- boom 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" }) -- Shockring 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.