Garry's Mod Wiki



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


CLuaParticle CLuaEmitter:Add( string material, Vector position )
Creates a new CLuaParticle with the given material and position.
Manually renders all particles the emitter has created.
Removes the emitter, making it no longer usable from Lua. If particles remain, the emitter will be removed when all particles die.
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.
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.
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 ).
CLuaEmitter:SetNoDraw( boolean noDraw )
Prevents all particles of the emitter from automatically drawing.
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.
CLuaEmitter:SetPos( Vector position )
Sets the position of the particle emitter.

Special Pages



Render Time: 48ms

DB GetPage 28
Generate Html 3
SaveChanges (1) 8
Render Body 0
Render Sidebar 6