yo, so, I need a bit of help

BustarodG

Member
im working on a personal mod that i Mightttt do something with but the big ol issue i have is that i suck at coding and im kiiinda new to it? not completely but mostly for sure. for now i just want some assistance in fixing this problem, im trying to make a somersault sort of move that goes forward, enters the roll type state where your player height goes down (and plays the roll/jump animation) and then after that it ends and you can go back to being in complete control, problem is, like i said, im not good at coding and im not 100% familiar with lua yet (yea, ive looked at the wiki and other stuff but it just does not stick or flies right over my head) so obviously i got an error for this, help would be greatly appreciated (also idk how this thread system stuff works, if i have new questions unrelated to this do i ask here again or do i create a new thread)

1773028274011.png
 
Here, i hope this can help you.

Lua:
addHook("ThinkFrame", function()

    for player in players.iterate do

        if player.mo.skin ~= "sonic" then

            continue

        end

     

        if (player.cmd.buttons & BT_CUSTOM1) and (player.mo.eflags & MFE_ONGROUND) then

             P_InstaThrust(player.mo, player.mo.angle, 25*FRACUNIT/1)

             player.mo.state = S_PLAY_ROLL

             player.pflags = $ | PF_SPINNING

        end

    end

end)

Enjoy, this code simulate a instant spindash roll, just change the roll status to the custom status if you use one but keep the pflags line
 

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

Back
Top