PWAD- -- No More Air Walking -- Many Minor Tweaks addHook("ThinkFrame", function() for player in players.iterate do if not(P_IsObjectOnGround(player.mo)) and (player.mo.state == S_PLAY_WALK or player.mo.state == S_PLAY_RUN) and not player.powers[pw_carry] then player.mo.state = S_PLAY_FALL end end end)local s = {} s[S_PLAY_MELEE_LANDING] = true addHook("PlayerThink", function(player) local mo = player.mo -- Less hassle if not(mo and mo.skin == "amy") or P_PlayerInPain(player) mo.hammerjumped = 0 -- Discontinue animation, if currently happening return -- Exits the script if not the correct character end -- Cool animation if mo.hammerjumped == 1 and mo.momz > 7 -- Rising mo.hammerjumped = 2 mo.state = S_PLAY_ROLL elseif mo.hammerjumped != 0 and (mo.momz < 0 or mo.state != S_PLAY_ROLL) -- Falling mo.state = S_PLAY_FALL mo.hammerjumped = 0 -- Discontinue the animation end if player.exiting or not(player.cmd.buttons & BT_JUMP) or not P_IsObjectOnGround(mo) or s[mo.state] != true return -- All code after this is for performing the action end -- Do extra stuff if we're super /*if player.powers[pw_super] P_NukeEnemies(player.mo, player.mo, 1536*FRACUNIT) P_StartQuake(15*FRACUNIT, 5) P_FlashPal(player, PAL_WHITE, 8) end*/ -- Play sfx S_StartSound(mo, sfx_jump) -- Change state mo.state = S_PLAY_MELEE_LANDING -- Add flags player.pflags = $ | (PF_JUMPED | PF_THOKKED | PF_NOJUMPDAMAGE) -- Define our multipliers for thrust local waterfactor = mo.eflags & MFE_UNDERWATER and 6*FRACUNIT/10 or FRACUNIT local superfactor = player.powers[pw_super] and 5 or 4 -- Define our final thrust amount local zthrust = 14 * superfactor * waterfactor / 4 -- superfactor / 4 will give us either 125% or 100%. P_SetObjectMomZ(mo, zthrust) mo.hammerjumped = 1 end) addHook("PostThinkFrame", do for player in players.iterate() do player.buttonslast = player.cmd.buttons end end)addHook("PlayerThink", function(player) -- the hook local mo = player.mo -- again if (mo and mo.skin == "amy") and not player.exiting and not P_IsObjectOnGround(mo) -- if Amy and not exiting and not on ground if (mo.state == S_PLAY_SPRING or mo.state == S_PLAY_FALL) and mo.hammerjumped == 0 -- if states are true and if amy has not hammer jumped if not (player.pflags & (PF_JUMPED|PF_STARTJUMP)) -- if the player currently has not jumped player.pflags = $ | PF_JUMPED|PF_NOJUMPDAMAGE -- assign it, so that she can use twinspin... and no jump damage end end end end)Character 4 Status = 0 SkinName = amy DisplayName = Amy Rose TagOutlineColor = SKINCOLOR_YELLOW Status = 2 PlayerText = ^1Amy^0 can't spin, but her hammer's destructive power is capable of breaking many walls, floors, and even spikes! ^1Ability:^0 Hammer Attack Press spin while grounded to swing her hammer. Double jump to swing it in midair. ^1Ability:^0 Hammer Jump Jump after using Hammer Attack to launch yourself upward. ^1Tip:^0 Hitting a spring with her hammer will launch her farther than normal. #name = amy hudname = amy ~LUA_AIRWŠ#LUA_HAJU­YLUA_TWNS SOC_AMY P_SKIN