Need help for a thok trail

SonikkuBoy

Are you up 2 it?
Hello, i need help for a thok trail, i want the character the reflect behind him while thoking, something like this :
srb20067.png
how can i do that?
 
also btw MT_GHOST is just an mobj that takes your sprite and makes it transparent a little(and dissappears) anyway if you want to make the exact ghost effect then you need Lua
 
Heres a script to spawn a ghost:
addHook("PlayerThink", function(player)
if player.mo.skin == "yourcharacternamehere" -- you can delete this line to make it works for any character (not recommended)
local ghost = P_SpawnGhostMobj(player.realmo)
end
end)
 
Colors are automatically put on the ghost to reflect the player's color.
Also, if a thok trail is what the outcome is supposed to be, the code would be:
Code:
addHook("PlayerThink", function(player)
    if not(player.mo and player.mo.valid and player.mo.skin == "skinname") then return end
    
    if player.pflags&PF_THOKKED
        local ghost = P_SpawnGhostMobj(player.mo)
        ghost.fuse = 10
        --Colorize is optional, just makes the ghost be completely blue or whatever
        ghost.colorized = true
    end
end)
 
where do i edit the colors
Lua:
addHook("PlayerThink", function(player)
    if not(player.mo and player.mo.valid and player.mo.skin == "skinname") then return end
    
    if player.pflags&PF_THOKKED
        local ghost = P_SpawnGhostMobj(player.mo)
        ghost.fuse = 10
        --Colorize is optional, just makes the ghost be completely blue or whatever
        ghost.colorized = true
        ghost.color == SKINCOLOR_GREEN
    end
end)
 
Lua:
addHook("PlayerThink", function(player)
    if not(player.mo and player.mo.valid and player.mo.skin == "skinname") then return end
   
    if player.pflags&PF_THOKKED
        local ghost = P_SpawnGhostMobj(player.mo)
        ghost.fuse = 10
        --Colorize is optional, just makes the ghost be completely blue or whatever
        ghost.colorized = true
        ghost.color == SKINCOLOR_GREEN
    end
end)
Thank you.
 
But how would you make the ghost effect appear based on sonic or the characters speed like the effect appears when moving at a speed of 42 fracunit
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top