util.SpriteTrail
Entity util.SpriteTrail( Entity ent, number attachmentID, table color, boolean additive, number startWidth, number endWidth, number lifetime, number textureRes, string texture )
Description
Adds a trail to the specified entity.
Arguments
2 number attachmentID
Attachment ID of the entities model to attach trail to. If you are not sure, set this to 0
8 number textureRes
The resolution of trails texture. A good value can be calculated using this formula: 1 / ( startWidth + endWidth ) * 0.5
Returns
Example
A console command that gives the player a red trail.
concommand.Add( "givetrail", function( ply )
local trail = util.SpriteTrail( ply, 0, Color( 255, 0, 0 ), false, 15, 1, 4, 1 / ( 15 + 1 ) * 0.5, "trails/plasma" )
print( trail )
end )