How do I Combo Attack

Just started using Construct 2? Post your questions here

Post » Fri May 26, 2017 6:11 pm

Hello people,

How can I make a combo of 3 or more attacks? I have the animations already made, I do not know how it is in operation

I've tried everything but nothing succeeds, who can help me?

thank you in advance

Sorry for my bad English :oops: :oops:
B
7
S
1
Posts: 47
Reputation: 558

Post » Sat May 27, 2017 12:25 pm

Add a local variable to the player sprite, and each time he makes a successful hit increment it by 1. if he misses reset it to 0. When it reaches 3 add an event which will trigger your combo attack.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Sat May 27, 2017 2:06 pm

Hi imhotep22,

Where can i find the local varible option?

i can only see, instance varibles - boolean , number , text

and when i press the normal attack he dont plays the animation by himself i need to hold it before he attacks, is there an easy fix for that?

it would be great to make a combo, I've been days trying to find something but I just can not find anything
B
7
S
1
Posts: 47
Reputation: 558

Post » Sat May 27, 2017 2:19 pm

You can use instance variable also, its does not matter really.

If you hold a button for the attack to happen, for example lets say key f on the keyboard and it takes 3 seconds to charge. You will have to add keyboard object in your project, after that in the event system add a condition on key f hold, as action add wait 1 sec, add 1 to instance variable (which is 0 on start, lets call it combo).

Now for the attack it self, add a condition combo => 3, ass action add your animation and the attack you want to happen, and reset the combo to 0.

You will also need a Boolean condition on the charging event, so when the combo attack is getting executed the charging with stop.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Sat May 27, 2017 3:01 pm

Thank you for taking the time to explain :)

It succeeded, the combo works :)
B
7
S
1
Posts: 47
Reputation: 558

Post » Sat May 27, 2017 3:36 pm

Glad to help, good luck with your game :)
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to Beginner's Questions

Who is online

Users browsing this forum: Milanbaudelaire and 2 guests