util.SpriteTrail
From GMod Wiki
Function | |
Syntax |
util.SpriteTrail( Entity entity, Integer AttachmentID, Color color, Boolean additive, Float Start Width, Float End Width, Float LifeTime, Float TextureRes, String Texture ) Where is this used? |
Description: | |
Adds a trail to the specified entity with texture Texture | |
Returns: | Entity |
Part of Library: | Util |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Util.SpriteTrail]Util.SpriteTrail [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Adds a trail onto entity "ent". |
---|---|
Used on | |
Code | local trail = util.SpriteTrail(ent, 0, Color(255,0,0), false, 15, 1, 4, 1/(15+1)*0.5, "trails/plasma.vmt") |
Output | N/A |
Additional Notes
- For texture res, a good calculation is 1/(startWidth+endWidth)*0.5
- Not including the file extension may cause the game to crash.
- The function returns an env_spritetrail entity.