Garry's Mod Wiki

List of all possible functions available for Lua particles. This is the object returned by the CLuaEmitter:Add function.

Methods

number CLuaParticle:GetAirResistance()

Returns the air resistance of the particle.

Angle CLuaParticle:GetAngles()

Returns the current orientation of the particle.

Angle CLuaParticle:GetAngleVelocity()

Returns the angular velocity of the particle

number CLuaParticle:GetBounce()

Returns the 'bounciness' of the particle.

number, number, number CLuaParticle:GetColor()

Returns the color of the particle.

number CLuaParticle:GetDieTime()

Returns the amount of time in seconds after which the particle will be destroyed.

number CLuaParticle:GetEndAlpha()

Returns the alpha value that the particle will reach on its death.

number CLuaParticle:GetEndLength()

Returns the length that the particle will reach on its death.

number CLuaParticle:GetEndSize()

Returns the size that the particle will reach on its death.

Vector CLuaParticle:GetGravity()

Returns the gravity of the particle.

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.

Vector CLuaParticle:GetPos()

Returns the absolute position of the particle.

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.

number CLuaParticle:GetStartLength()

Returns the length which the particle has when it's created.

number CLuaParticle:GetStartSize()

Returns the size which the particle has when it's created.

Vector CLuaParticle:GetVelocity()

Returns the current velocity of the particle.

void CLuaParticle:SetAirResistance( number airResistance )

Sets the air resistance of the the particle.

void CLuaParticle:SetAngles( Angle ang )

Sets the angles of the particle.

void CLuaParticle:SetAngleVelocity( Angle angVel )

Sets the angular velocity of the the particle.

void CLuaParticle:SetBounce( number bounce )

Sets the 'bounciness' of the the particle.

void CLuaParticle:SetCollide( boolean shouldCollide )

Sets the whether the particle should collide with the world or not.

void CLuaParticle:SetCollideCallback( function collideFunc )

Sets the function that gets called whenever the particle collides with the world.

void CLuaParticle:SetColor( number r, number g, number b )

Sets the color of the particle.

void CLuaParticle:SetDieTime( number dieTime )

Sets the time where the particle will be removed.

void CLuaParticle:SetEndAlpha( number endAlpha )

Sets the alpha value of the particle that it will reach when it dies.

void CLuaParticle:SetEndLength( number endLength )

Sets the length of the particle that it will reach when it dies.

void CLuaParticle:SetEndSize( number endSize )

Sets the size of the particle that it will reach when it dies.

void CLuaParticle:SetGravity( Vector gravity )

Sets the directional gravity aka. acceleration of the particle.

void 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.

void CLuaParticle:SetLighting( boolean useLighting )

Sets whether the particle should be lighted.

void CLuaParticle:SetNextThink( number nextThink )

Sets when the particles think function should be called next, this uses the synchronized server time returned by CurTime.

void CLuaParticle:SetPos( Vector pos )

Sets the absolute position of the particle.

void CLuaParticle:SetRoll( number roll )

Sets the roll of the particle in radians. This should only be used for 2D particles.

void CLuaParticle:SetRollDelta( number rollDelta )

Sets the rotation speed of the particle in radians. This should only be used for 2D particles.

void CLuaParticle:SetStartAlpha( number startAlpha )

Sets the initial alpha value of the particle.

void CLuaParticle:SetStartLength( number startLength )

Sets the initial length value of the particle.

void CLuaParticle:SetStartSize( number startSize )

Sets the initial size value of the particle.

void CLuaParticle:SetThinkFunction( function thinkFunc )

Sets the think function of the particle.

void CLuaParticle:SetVelocity( Vector vel )

Sets the velocity of the particle.

void CLuaParticle:SetVelocityScale( boolean doScale = false )

Scales the velocity based on the particle speed.

Page Links


Special Pages


Wikis

?

Render Time: 35ms

Session 0
DB GetPage 2
Generate Html 7
SaveChanges 10
Render Body 0
Render Sidebar 13