Spindash While Crouching

Cheeseboi!

just kinda here.
I want to make a lua script that allows my character to spindash while in the glide land state.

Lua:
           addHook("PlayerThink", function(player)
           for player in players.iterate do
           if player.mo.skin == "mdsonic" then
           if (P_IsObjectOnGround(player.mo) == true and p.mo.state == S_PLAY_GLIDE_LANDING and player.cmd.buttons & BT_JUMP)
           player.jumpfactor = 0
           player.mo.momx = 0
           player.mo.momy = 0
           player.mo.momz = 0
           player.pflags = $1|PF_STARTDASH
           player.mo.state = S_PLAY_SPINDASH
           end
        end
    end
end)

I don't know why it doesn't work as srb2 doesn't show any errors.
 

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

Back
Top