How do I make combo attacks?

Get help using Construct 2

Post » Thu Oct 30, 2014 8:16 pm

I've got a full blown prototype for this game that runs in a similar fashion to smash brothers running on a different platform (BYOND/DM). I'm porting it over to C2 for numerous reasons. I have all the stages in place, title screen, platform plus for the movement, etc. The only thing is right now I'm stuck trying to get a simple attack in place. I have 3 punch animations. 1,2,3 that are to go in a combo if the player hit the Punch button 3 times in order.

Right now I have basically;

On key pressed
-ComboAttack=0 -set animation to "A1"
--ComboAttack=1 -set animation to "A2"
---ComboAttack=2 -set animation to "A3"

-On "A1" finished -set ComboAttack to 1 -set animation to "idle"
-On "A2" finished -set ComboAttack to 2 -set animation to "idle"
-On "A3" finished -set ComboAttack to 0 -set animation to "idle"

But only A1 plays when I press the button? am I missing something?
B
7
S
1
Posts: 28
Reputation: 459

Post » Thu Oct 30, 2014 8:22 pm

Confusing. Can you post a capx example?
B
34
S
5
G
1
Posts: 164
Reputation: 2,725

Post » Thu Oct 30, 2014 8:28 pm

B
7
S
1
Posts: 28
Reputation: 459

Post » Thu Oct 30, 2014 8:59 pm

:D
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Thu Oct 30, 2014 9:00 pm

Try to work something like this (needs polishing)

edit: Sorry, I tried to upload but file is too large. There goes a link:
https://www.dropbox.com/s/e6xmv17qr6f8m ... .capx?dl=0
B
34
S
5
G
1
Posts: 164
Reputation: 2,725

Post » Thu Oct 30, 2014 9:06 pm

Instead of using my set idle animation code, just set combo variable to 0 again. And define the time you want it to reset (last line I added on your code) And this must work.
B
34
S
5
G
1
Posts: 164
Reputation: 2,725

Post » Thu Oct 30, 2014 9:33 pm

Thanks guys!! Really appreciate it! :)
B
7
S
1
Posts: 28
Reputation: 459


Return to How do I....?

Who is online

Users browsing this forum: farsen and 28 guests