Particle.SetEndAlpha

From GMod Wiki

Jump to: navigation, search
Function
Syntax Particle:SetEndAlpha( Integer amount )
Description:
Sets the end transparency of a particle. The particle will fade to this amount over its lifetime
Returns: nil
In Object: CLuaParticle
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Particle.SetEndAlpha]Particle.SetEndAlpha [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis doesn't create any effect on it's own, but this is how it is set up in the init.lua of the effect.
Used onNewerClient.png
Code
 
            local particle = emitter:Add( "effects/blood_core", Pos )
                particle:SetVelocity( Vector(0.001, 0.001, 0.001) )
                particle:SetDieTime( 1 )
                particle:SetStartAlpha( 255 )
                particle:SetEndAlpha( 0 )
                particle:SetStartSize( 8 )
                particle:SetEndSize( 8 )
                particle:SetRoll( 0 )
                particle:SetRollDelta( 0 )
                particle:SetColor( 0, 159, 249 )
		particle:SetAirResistance( 20 );
		particle:SetGravity( Vector( 0, 0, 0 ) );
		particle:SetCollide( true );
		particle:SetBounce( 0 ); 
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox