Combo System

Get help using Construct 2

Post » Sat Jul 20, 2013 4:25 am

I am working with a basic platformer action game. I want to implement a combo system to where hitting an enemy consecutively would build a combo. However, I am using the animation of my sword as a hitbox.. and there are multiple frames that would collide with an enemy.

For instance, if I swing once and hit the enemy, the combo counter goes up by 3 (because 3 frames collide with the enemy). I want only an increase of 1 for the counter. How can I do this?
B
4
Posts: 2
Reputation: 229

Post » Sat Jul 20, 2013 5:21 am

One way you could do it is give your sword a variable, say "hit". Then whenever the sword is swung, if it hits something like an enemy, have events that increase the combo count by 1 and change the "hit" variable to true.
Then put a condition on said event where it only activates then "hit" is false.
Finally at the end of the sword animation have an event that changes the "hit" variable back to true. This way the sword can only "hit" something once per swing.
B
6
S
2
Posts: 15
Reputation: 1,123

Post » Sat Jul 20, 2013 5:40 am

Wow right on! This worked perfectly. Thank you very much.   
B
4
Posts: 2
Reputation: 229


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 6 guests