//Plasmatic trail --Edited by Golden Shine for better performance, stability, and to be mod-friendly addHook("PlayerThink", function(p) if not (p.mo and p.mo.valid) return end local s = p.mo --Only if the player mobj exists. if (#skins[s.skin] or 0) > 5 return end --Apply to vanilla skins only! if s.skin == "sonic" if s.state == S_PLAY_SPINDASH or p.powers[pw_super] and (p.speed or s.momz) --Sonic has a longer super ghost time, apparently. Neat! local ghs = P_SpawnGhostMobj(s) ghs.fuse = (s.state == S_PLAY_SPINDASH) and 10 or 9 ghs.blendmode = AST_ADD ghs.colorized = true end elseif p.powers[pw_super] or (p.dashmode >= DASHMODE_THRESHOLD) if p.speed or s.momz --Only spawn trails if any kind of movement is happening. local ghs = P_SpawnGhostMobj(s) ghs.fuse = 5 ghs.blendmode = AST_ADD ghs.colorized = true --P_SpawnGhostMobj automatically uses the player's color, no need to assign it one. if (p.dashmode >= DASHMODE_THRESHOLD) --...without setting a destscale? Why? Oh well, proceed. ghs.scalespeed = FRACUNIT/15 end end end end)