CLuaParticle
List of all possible functions available for Lua particles. This is the object returned by the CLuaEmitter:Add function.
Methods
number CLuaParticle:GetDieTime()
Returns the amount of time in seconds after which the particle will be destroyed.
number CLuaParticle:GetLifeTime()
Returns the 'life time' of the particle, how long the particle existed since its creation.
This value will always be between 0 and CLuaParticle:GetDieTime.
It changes automatically as time goes.
It can be manipulated using CLuaParticle:SetLifeTime.
If the life time of the particle will be more than CLuaParticle:GetDieTime, it will be removed.
number CLuaParticle:GetRoll()
Returns the current rotation of the particle in radians, this should only be used for 2D particles.
number CLuaParticle:GetRollDelta()
Returns the current rotation speed of the particle in radians, this should only be used for 2D particles.
number CLuaParticle:GetStartAlpha()
Returns the alpha value which the particle has when it's created.
CLuaParticle:SetCollide( boolean shouldCollide )
Sets the whether the particle should collide with the world or not.
CLuaParticle:SetCollideCallback( function collideFunc )
Sets the function that gets called whenever the particle collides with the world.
CLuaParticle:SetEndAlpha( number endAlpha )
Sets the alpha value of the particle that it will reach when it dies.
CLuaParticle:SetEndLength( number endLength )
Sets the length of the particle that it will reach when it dies.
CLuaParticle:SetEndSize( number endSize )
Sets the size of the particle that it will reach when it dies.
CLuaParticle:SetGravity( Vector gravity )
Sets the directional gravity aka. acceleration of the particle.
CLuaParticle:SetLifeTime( number lifeTime )
Sets the 'life time' of the particle, how long the particle existed since its creation.
This value should always be between 0 and CLuaParticle:GetDieTime.
It changes automatically as time goes.
If the life time of the particle will be more than CLuaParticle:GetDieTime, it will be removed.
CLuaParticle:SetLighting( boolean useLighting )
Sets whether the particle should be affected by lighting.
CLuaParticle:SetNextThink( number nextThink )
Sets when the particles think function should be called next, this uses the synchronized server time returned by CurTime.
CLuaParticle:SetRoll( number roll )
Sets the roll of the particle in radians. This should only be used for 2D particles.
CLuaParticle:SetRollDelta( number rollDelta )
Sets the rotation speed of the particle in radians. This should only be used for 2D particles.
CLuaParticle:SetVelocityScale( boolean doScale = false )
Scales the velocity based on the particle speed.