Garry's Mod Wiki

List of all possible functions available for LuaEmitters. This is the object returned by the ParticleEmitter function.

Methods

CLuaParticle CLuaEmitter:Add( string material, Vector position )

Creates a new CLuaParticle with the given material and position.

void CLuaEmitter:Draw()

Manually renders all particles the emitter has created.

void CLuaEmitter:Finish()

Removes the emitter and all its particles.

number CLuaEmitter:GetNumActiveParticles()

Returns the amount of active particles of this emitter.

Vector CLuaEmitter:GetPos()

Returns the position of this emitter. This is set when creating the emitter with ParticleEmitter.

boolean CLuaEmitter:Is3D()

Returns whether this emitter is 3D or not. This is set when creating the emitter with ParticleEmitter.

boolean CLuaEmitter:IsValid()

Returns whether this CLuaEmitter is valid or not.

void CLuaEmitter:SetBBox( Vector mins, Vector maxs )

Sets the bounding box for this emitter.

Usually the bounding box is automatically determined by the particles, but this function overrides it.

void CLuaEmitter:SetNearClip( number distanceMin, number distanceMax )

This function sets the the distance between the render camera and the emitter at which the particles should start fading and at which distance fade ends ( alpha becomes 0 ).

void CLuaEmitter:SetNoDraw( boolean noDraw )

Prevents all particles of the emitter from automatically drawing.

void CLuaEmitter:SetParticleCullRadius( number radius )

The function name has not much in common with its actual function, it applies a radius to every particles that affects the building of the bounding box, as it, usually is constructed by the particle that has the lowest x, y and z and the highest x, y and z, this function just adds/subtracts the radius and inflates the bounding box.

void CLuaEmitter:SetPos( Vector position )

Sets the position of the particle emitter.

Page Links


Special Pages


Wikis

?

Render Time: 25ms

Session 0
DB GetPage 2
Generate Html 6
SaveChanges 9
Render Body 0
Render Sidebar 6