Smooth Spin Trail!

[Open Assets] Smooth Spin Trail! v1

I made a smooth spin trail somehow.
It's made of 30 lines of code and can be applied to any object and use any thok object.
For convenience, the lua includes a code that runs the function when spinning as demonstration.
The BLEND version features the 2.2.9 AST_ADD blendmode effect, which gives the trail a nice shiny look.
srb20824.gif

-Blending, Software. GIF by Cutedy.
srb20054.gif

-Blending, OpenGL. GIF by BuggieTheBug.
srb20322.gif

-No blending.

The function is: SmoothTrai(mo, trailmo, freq).
mo is the object you use as source (e.g. player.mo).
trailmo is the thok object the trail will be made of (e.g. MT_THOK).
freq is the distance between 2 thok objects (e.g. 4*FRACUNIT).
Author
aquaponiee
Downloads
6,423
Views
13,541
First release
Last update

More resources from aquaponiee

Share this resource

Latest reviews

its alright but i need a way to do it for one character only, is there a possible fix?
aquaponiee
aquaponiee
i have made it as easy as possible to integrate this into existing character mods. let's see the code: there is a smooth trail function, and then a playerthink hook that runs the function if the player is spinning and also removes the default spin trail.
you just copy the smooth trail function to the top of your script, and run it whenever just like any other function.
be wary, working with scripts and functions requires knowing Lua
Upvote 0
OUTSTANDING! I Like This Mod! Together With Most Addon Improvements!
Upvote 0
It`s cool, but has a small issue with "freq": If you dont make it *FRACUNIT then SRB2 just crashes(for example: 5 or 0*FRACUNIT).
aquaponiee
aquaponiee
It's not a bug. It just spawns so many thok objects the game crashes. A FRACUNIT already is a extremely small distance (merely 1 pixel) so you don't want to set the frequency to just a very small fraction of it.
Upvote 0
I love this mod but is there a way to turn down the blend?
aquaponiee
aquaponiee
Sure, just download the blendless version!(L_SmoothSpinTrail-v1.lua instead of L_SmoothSpinTrail_BLEND-v1.lua)
Upvote 0
very very nice! I love the look of it.
Upvote 0
Welcome to releases!
Upvote 0
Back
Top