About my Addon for the Next Update

jaybitts10

Member
I Needed a hyper form from CrossMomentum, but....
Things didnt work out for my addon for the hyperform... Heres what happened:


I Tried to make the lua for the Hyper form, but It gave me a warning, My code looks like this:
Code:
local function SpawnHyperSparkles(player)
    if player.hyper and player.hyper.capable and player.powers[pw_super] and player.mo.skin == "jayt"
        local hypersparkle = P_SpawnMobjFromMobj(player.mo, 0, 0, 20*FRACUNIT, MT_JTHYPERSPARKLES)
        hypersparkle.momx = P_RandomRange(-5, 5) * FRACUNIT + FixedMul(-12, 12, player.mo.scale)
        hypersparkle.momy = P_RandomRange(-5, 5) * FRACUNIT + FixedMul(-12, 12, player.mo.scale)
        hypersparkle.momz = P_RandomRange(-5, 5) * FRACUNIT + FixedMul(-12, 12, player.mo.scale)
        //hypersparkle.fuse = 6
        hypersparkle.scale = player.mo.scale * 20/22
        hypersparkle.source = player.mo
        if hypersparkle.source.player == displayplayer
            local chasecam = CV_FindVar("chasecam")
            if (chasecam.value == 1)
                hypersparkle.flags2 = $ & ~MF2_DONTDRAW
            elseif (chasecam.value == 0)
                hypersparkle.flags2 = $ | MF2_DONTDRAW
            end
        end
        return hypersparkle
    end
end

addHook("PlayerThink", function(player)
    if player.mo.skin == "jayt"
        --You need to collect 100 rings while in your normal form before transforming to go hyper.
        if player.rings > 99 and not player.powers[pw_super]
            player.hyper.capable = true
        end
        --If you haven't collected enough rings, *swear words*, you aren't going hyper.
        if player.rings < 99 and not player.powers[pw_super]
            player.hyper.capable = false
        end

        if player.hyper.capable and player.powers[pw_super]
            --Hyper forms don't need to breathe.
            if (pmo.eflags & MFE_UNDERWATER)
                player.powers[pw_underwater] = 0
            end
            if P_InSpaceSector(pmo)
                player.powers[pw_spacetime] = 0
            end
        end

        if player.rings < 2
        and player.hyper
        and player.hyper.capable
        and player.powers[pw_super] > 0
        and player.mo.skin == "jayt"
            P_GivePlayerRings(player, 9)
            player.hyper.capable = false
            P_PlayJingleMusic(player, "_super", nil, true, JT_OTHER)

            if G_RingSlingerGametype()
                COM_BufInsertText(server,"csay "..player.name.."\\IS NO LONGER HYPER AND CHANGED INTO SUPER.\\\\\\\\")
                S_StartSound(nil, sfx_s3k9c)
            end
        end
    end
end)

addHook("PlayerThink", SpawnHyperSparkles)

addHook("PlayerThink", function(player)
    if player.mo.skin == "jayt"
        if player.hyper.capable and player.powers[pw_super]
            if (player.cmd.buttons & BT_CUSTOM1)
                player.mo.state = S_PLAY_FIRE_FINISH
                P_SpawnPlayerMissile(player.mo, MT_KNIF)
            elseif (player.cmd.buttons & BT_CUSTOM3)
                player.hyper.capable = false
            end
               
            if (leveltime % 35 == 18) and player.hyper.capable and player.powers[pw_super]
                P_GivePlayerRings(player, -1)
            end
               
            if (player.cmd.buttons & BT_SPIN) and P_IsObjectOnGround(player.mo) and not player.pressedspin
                S_StartSound(player.mo, sfx_zoom)
                P_Thrust(player.mo, player.mo.angle, 60*FRACUNIT)
                player.mo.state = S_PLAY_RUN
                P_NukeEnemies(player.mo, player.mo, 1536*FRACUNIT)
                S_StartSound(player.mo, sfx_hprdsh) // aka Super Dash
                player.pressedspin = true
            else
                player.pressedspin = false
            end
               
            if (player.cmd.buttons & BT_JUMP) and not (player.pflags & PF_THOKKED) and not P_IsObjectOnGround(player.mo)
                player.mo.state = S_PLAY_FALL
                P_Thrust(player.mo, player.mo.angle, 60*FRACUNIT)
                P_SpawnPlayerMissile(player.mo, MT_THOKSPARKLE)
                P_NukeEnemies(player.mo, player.mo, 1536*FRACUNIT)
                S_StartSound(player.mo, sfx_hprdsh)
                player.pflags = $|PF_THOKKED
            end
        end
    end
end)

How do I Make my hyper form Fine without it going crazy?
sorry if I went into the wrong board btw.
Post automatically merged:

dang it, the gif didnt go, heres the video:
 
Last edited:
I Needed a hyper form from CrossMomentum, but....
Things didnt work out for my addon for the hyperform... Heres what happened:
1. You are probably in the wrong board. This board is for troubleshooting the vanilla game, you probably want Modding Help instead, for future reference.
2. The warnings in the video encompass multiple scripts. What do the others look like?
 
1. You are probably in the wrong board. This board is for troubleshooting the vanilla game, you probably want Modding Help instead, for future reference.
2. The warnings in the video encompass multiple scripts. What do the others look like?
idk. but someone for this might know.
 

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

Back
Top