• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Rapid Punching attack

Hello Everyone! i'm looking to make a rapid melee attack i think the best primary example would be Chun li's lighting legs. I'm not really sure how to go about them. If anyone has played a street fighter game, you would know that it requires you to tap the button multiple times in order for it to loop the animation. I wondering if i should just make one whole animation and just have the player rapidly click the attack button and reset the animation before the animation ends. Or should i split them up into separate sprite groups and just have the animation change to the next one upon successful hit.

of course i foresee a problem with the second option seeing as to how it might seem or feel slow to the player. Any ideas would be greatly appreciated.
 
W

whale_cancer

Guest
Why not just an alarm that is triggered when you first use the attack. The attack loops at the end of the alarm if the player hits the button in time. If they did not, it does not loop and attack ends. This way the attack will look smooth.
 
A

ajan-ko

Guest
Code:
if (buttonPressed){
    if (sprite_index==normal_attack_sprite){
        mash++ //mash + 1
        if (mash >=3) {
              sprite_index=chun_li_kick //if you press 3 times then your normal move canceled into chun li specials
              image_index=0 //reset your image index
        }
    }else{
        mash=0 //reset your mash
        sprite_index=normal_attack_sprite //do normal attack
        image_index=0 //reset your image index
    }

}
You need to init those mash variable first in object create.
So if your character still using normal_attack_sprite, if you press your button 3 times, BAM!! Specials.
 
Last edited:
Code:
if (buttonPressed){
    if (sprite_index==normal_attack_sprite){
        mash++ //mash + 1
        if (mash >=3) {
              sprite_index=chun_li_kick //if you press 3 times then your normal move canceled into chun li specials
              image_index=0 //reset your image index
        }
    }else{
        mash=0 //reset your mash
        sprite_index=normal_attack_sprite //do normal attack
        image_index=0 //reset your image index
    }

}
You need to init those mash variable first in object create.
So if your character still using normal_attack_sprite, if you press your button 3 times, BAM!! Specials.
Thank you i was gonna go this route, i thought that there'd be an easier way but this way works, !
 
Top