How do I make a Character Combo

Get help using Construct 2

Post » Sun Jul 21, 2013 5:16 am

I have a platform character which plays an animation attack if I press "Z"
now I want my character to play different animation every time I hit "Z"
doing a combo attack but I'm having a problem making a timer, I want my event to be like these, If I hit "Z" play attack animation 1 if I hit again play attack animation 2 and so on, but it must have a timer to reset the time if the animation 1 took so long then reset the again to play attack animation 1.
B
8
S
3
G
2
Posts: 23
Reputation: 2,076

Post » Sun Jul 21, 2013 7:36 am

I have made a small example of how you might be able to accomplice what you are trying to do.

Very simplified, but could be a solution.

.capx
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Jul 22, 2013 3:25 pm

Hello again I'm still confused if only there's a way that I can change the every "x" action but nevermind. here's my sample game [URL=https://dl.dropboxusercontent.com/u/98958302/sample.capx][/URL]
I would like to make my character do a combo if only he hit the enemy and if the combo took long the combo break and will start again from combo 1 to 4
B
8
S
3
G
2
Posts: 23
Reputation: 2,076

Post » Mon Jul 22, 2013 7:02 pm

You could make a variable and set the value to system.time+5 (for 5 seconds) everytime z is pressed. check if the system.time is equal or more than the variable and if so set the variable attackcombo back to 1. Set the other variable to 0 and only check it against system.time if it's not 0.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: thewisetree and 3 guests