Garry's Mod Wiki

effects.Bubbles

  effects.Bubbles( Vector mins, Vector maxs, number count, number height, number speed = 0, number delay = 0 )

Description

Creates a bunch of bubbles inside a defined box.

Arguments

1 Vector mins
The lowest extents of the box.
2 Vector maxs
The highest extents of the box.
3 number count
How many bubbles to spawn. There's a hard limit of 500 tempents at any time.
4 number height
How high the bubbles can fly up before disappearing.
5 number speed = 0
How quickly the bubbles move.
6 number delay = 0
Delay in seconds after the function call and before the effect actually spawns.

Example

concommand.Add( "giveme_bubbles", function( ply ) local pos = ply:GetEyeTrace().HitPos local mins = Vector( 100, 100, 0 ) local maxs = Vector( 100, 100, 100 ) effects.Bubbles( pos - mins, pos + maxs, 100, 200, 0 ) end )
Output:
image.png