SonicSpades
The Scarlet King of Spades.
I'm making a C1 ability similar to the stomp. And I need help making a different version of it when the Whirlwind Shield is on. Ideally if C1 is pressed in midair with a Whirlwind shield on, I want my character to slam down for a short time and then, when they hit the ground, they go into spring frame for a higher Whirlwind jump. Note: my character has noshieldabilities on.
Current code:
Current code:
Lua:
addHook("PlayerThink", function(player)
if player.mo.skin == "sonic" and player.powers[pw_shield] ~= SH_WHIRLWIND then
if (player.mo.state == S_PLAY_JUMP)
and (player.cmd.buttons & BT_CUSTOM1)
player.mo.momz = -30*FRACUNIT
player.mo.momx = $ /4
player.mo.momy = $ /4
S_StartSound(player.mo, sfx_s3k49)
end
end
if player.mo.skin == "sonic"
and player.powers[pw_shield] == SH_WHIRLWIND then
if (player.mo.state == S_PLAY_STND)
and (player.cmd.buttons & BT_CUSTOM1)
player.mo.momz = 25*FRACUNIT
player.mo.state = S_PLAY_JUMP
S_StartSound(player.mo, sfx_s3k97)
if (player.mo.state == S_PLAY_JUMP)
and not (player.cmd.buttons & BT_CUSTOM1)
player.mo.momz = -150*FRACUNIT
player.mo.state = S_PLAY_FALL
S_StartSound(player.mo, sfx_s3k9e)
end
end
end
end)
Last edited: