Set up a 6 combo attack?

Get help using Construct 2

Post » Mon Feb 27, 2017 4:32 pm

i want to make a fighting game using this engine. Exactly how do i do combo attacking?
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Mon Feb 27, 2017 4:56 pm

There are several ways of doing what you want.

First of all think of what would end the combo:
- Landing on the floor
- After certain amount of time with no hit, combo is over

Those End-Of-Combo conditions can be translated into Events.
- Playerbox is on floor / overlapping / collision etc...
- on Timer -> End combo

The way you would do this is really up to you.
I would imagine this like that:
- Setup a variable on the player instance "combocounter"
- Setup a object with a Timer behavior
- With each hit add to that variable and set the Timer you configured to duration x-seconds (depends on how long your combo without a hit would last. This will make sure everytime you make a next hit, the timer will be reset to the full duration.
- Setup an event "on timer..." that will catch your timer when it runs out and make it call a function "endCombo".
- Setup your function "endCombo" and make it do all the stuff you want when a combo is over. e.g. add points or show the final combo count.
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Post » Mon Feb 27, 2017 5:01 pm

Any way you can elaborate?
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Mon Feb 27, 2017 5:47 pm

You can check this quick example that should get you started:
https://drive.google.com/open?id=0B5CwB ... WNnbjJrMDg
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Post » Mon Feb 27, 2017 6:30 pm

thats real good, but im talking about animations. like i press the hit button, it plays animation
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Mon Feb 27, 2017 6:38 pm

Bobbyneal100 wrote:thats real good, but im talking about animations. like i press the hit button, it plays animation


Basically the same technique.
According to the combo amount change the animation to play when you press hit. Which will be reset by some criteria, just like in the example.
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Post » Mon Feb 27, 2017 7:51 pm

I'm making a fighting game ,too. Here is a video what I'm working on. Now what do you want to do? I couldn't get it.

https://www.youtube.com/watch?v=CLla2-asI9A
B
26
S
13
G
1
Posts: 130
Reputation: 3,033

Post » Mon Feb 27, 2017 9:52 pm

Yes that is what im looking for. Any .capc?
B
30
S
13
G
3
Posts: 132
Reputation: 4,141

Post » Mon Feb 27, 2017 9:54 pm

Bobbyneal100 wrote:Any way you can elaborate?


LOL! After all of that text which made lots of sense to myself. I'm starting to think that lots of new users don't see the difference between an 'animation' and an 'event'.
B
206
S
115
G
8
Posts: 140
Reputation: 20,801

Post » Mon Feb 27, 2017 10:45 pm

@Bobbyneal100

A little bit complex.

The system works like this.

When hit right punch button while animation is "Idle",set animation to "Right Punch".

When hit right punch button again while animation is "Rİght Punch",set animation to "Double Right Punch".

When hit Left punch button again while animation is "Double Right Punch" , set animation to "Right punch,right punch , left punch (rp,rp,lp)" Etc.

https://drive.google.com/file/d/0B9xK1e ... sp=sharing
B
26
S
13
G
1
Posts: 130
Reputation: 3,033

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 21 guests