Okay, so I am creating a Flash game for an assignment. In my game, I have a character that I want to have combo attacks for. I had difficulty finding a tutorial concerning my problem so I eventually came to this help section.
If anyone would help me figure out how to code a combo attack. I want the coding to be so that when I continue to press a specific button, my character will continue to perform attacks.
Help! Flash Game Combo Attack
Started by: Takahishi | Replies: 4 | Views: 964
Feb 23, 2012 12:02 PM #607265
Feb 23, 2012 5:31 PM #607378
Either have a standing-still start position or a bouncing-back-and-forth start position depending on what you want. If it's standing still put a stop() in the movieclip and if it's a bouncing loop put a gotoAndPlay (1) on the last frame of the bounce so that it loops smoothly. Then animate the first attack from the frame after the loop/stop, with all the frames of the starting position having gotoAndPlay (8 [for example]) on the press of the "attack" button. Animate it going back to the start position, but on the last frame or two of the followthrough have gotoAndPlay (18 [for example]) triggered by pressing "attack" again. Frame 18 [for example] will have the second attack of your combo following smoothly off the first. Repeat for as long as you like.
That's how I'd do it, but there are several ways and you might find it more fun to do something else.
That's how I'd do it, but there are several ways and you might find it more fun to do something else.
Feb 23, 2012 7:19 PM #607438
So simply, when at the end of each attack frames, I need to have at the end gotoAndPlay and wherever the next attack is with each attack animated so that it can smoothly return to the idle position?
Feb 23, 2012 11:18 PM #607545
Yeah, that sounds right.
Feb 24, 2012 2:34 PM #607800
Ok thanks. I will get on that when I get the chance.