Puppyfaic
Member
EDIT: Got the animation playing now, sort of...if anyone can help me with the actual ability, I basically want the player to move at a fixed speed for as long as he holds down the Spindash button, and when he lets go he stops moving completely.
Things I need to figure out how to do:
Figure out how to make the player hurt enemies without being in a spin state/disable the spin trail
Make all momentum stop only when the button is let go, not just when not being pressed.
Things I need to figure out how to do:
Figure out how to make the player hurt enemies without being in a spin state/disable the spin trail
Make all momentum stop only when the button is let go, not just when not being pressed.
Code:
freeslot("SPR_ATTK","S_PLAY_ATTACK1", "S_PLAY_ATTACK2", "S_PLAY_ATTACK3", "S_PLAY_ATTACK4", "S_PLAY_ATTACK5", "S_PLAY_ATTACK6", "S_PLAY_ATTACK7", "S_PLAY_ATTACK8")
states[S_PLAY_ATTACK1] = {SPR_ATTK, 0, 1, nil, 0, 0, S_PLAY_ATTACK2}
states[S_PLAY_ATTACK2] = {SPR_ATTK, 1, 1, nil, 0, 0, S_PLAY_ATTACK3}
states[S_PLAY_ATTACK3] = {SPR_ATTK, 2, 1, nil, 0, 0, S_PLAY_ATTACK4}
states[S_PLAY_ATTACK4] = {SPR_ATTK, 3, 1, nil, 0, 0, S_PLAY_ATTACK5}
states[S_PLAY_ATTACK5] = {SPR_ATTK, 4, 1, nil, 0, 0, S_PLAY_ATTACK6}
states[S_PLAY_ATTACK6] = {SPR_ATTK, 5, 1, nil, 0, 0, S_PLAY_ATTACK7}
states[S_PLAY_ATTACK7] = {SPR_ATTK, 6, 1, nil, 0, 0, S_PLAY_ATTACK8}
states[S_PLAY_ATTACK8] = {SPR_ATTK, 7, 1, nil, 0, 0, S_PLAY_ATTACK1}
addHook("ThinkFrame", function()
for player in players.iterate do
if player.mo.skin ~= "sharp" then
continue
end
if (player.cmd.buttons & BT_USE)
and not player.powers[pw_super]
and not (player.pflags & PF_NIGHTSMODE)
and not (player.pflags & PF_ROPEHANG)
and not (player.pflags & PF_MACESPIN)
and not (player.pflags & PF_TAGGED)
and not (player.pflags & PF_STASIS)
and not (player.mo.tracer and player.mo.tracer.type == MT_TUBEWAYPOINT)
and not (player.exiting)
and (player.health) then
A_Thrust(player.mo, 30, 1)
S_StartSound(player.mo, sfx_s3kd8s)
player.pflags = $1|PF_SPINNING
player.mo.state = S_PLAY_ATTACK1
end
end
end)
Last edited: