Something weird happened when recreating Elemental Stomp

CloneFighter

Mediocre Lua scripter
So upon stomping down the player gets stuck fsr.
Gif:
Elemental Stomp not behaving

Related code:
    elseif player.shieldability == "stomp"
        if player.stomping == true
            P_SetObjectMomZ(player.mo, -25*FRACUNIT)
            P_SpawnThokMobj(player)
            P_InstaThrust(player.mo, 0, 0)
           
            if P_IsObjectOnGround(player.mo)
                player.stomping = false
                P_SetObjectMomZ(player.mo, 5*FRACUNIT)
                player.mo.state = S_PLAY_FALL
                player.mo.flags = $|PF_NOJUMPDAMAGE|PF_THOKKED
                if player.mo.eflags & MFE_UNDERWATER
                    S_StartSound(player.mo, sfx_s3k4c)
                else
                    for i = 1, 8
                        local flame = P_SpawnMobjFromMobj(player.mo, 0, 0, 0, MT_SPINFIRE)
                        if multiplayer
                            flame.colorized = true
                        end
                        flame.color = player.skincolor
                        P_InstaThrust(flame, player.mo.angle + (ANGLE_45*i), 3*FRACUNIT)
                        P_SetObjectMomZ(flame, 5*FRACUNIT)
                        flame.target = player.mo
                        flame.fuse = 7*TICRATE
                    end
                    S_StartSound(player.mo, sfx_s3k47)
                end
            elseif player.mo.eflags & MFE_SPRUNG then
                player.stomping = false
            end
        end
    end
 
first, how did you make sonic do that? I am gonna TRY and fix it. No promises tho
why do you wanna know
Post automatically merged:

...actually I'm a mega dummy. I put player.mo.flags instead of player.pflags. Lmfao.
Post automatically merged:

I think one of the flags results in PF_NOJUMPDAMAGE|PF_THOKKED adding MF_NOTHINK. That's why I was prevented from moving - the thinker stopped.
 
Last edited:

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

Back
Top