Loosing my mind, complex attack animation

Get help using Construct 2

Post » Sat Feb 28, 2015 10:51 pm

So yeah as you can see I am loosing my mind :| . But seriously.

Anyway here is the thing I want to make a great attack combo sequence but everything i do just doesn't seem to work. I have tried quit a bit of different events and if you take a look at my previous posts you will see I am constantly fighting it.
So what do I need? Well, I need help. A lot of it if possible, and I really can't continue trying because I don't have enough experience jet, so I would be very very grateful if you could help me.

Well let me get to the point.
I have 4 different attack animations. Light attack 1 (LA1), Light attack 2 (LA2) , Heavy attack 1(HA1), Heavy attack 2(HA2)

A-activates LA 1
pressing A again starts LA2, spamming A will spam LA2

S-activates HA1
pressing S again starts HA2,spamming S will spam HA2

But the thing is that you should be able to combine those 4.
Now imagine this is a combo sequence this is how it should go
A,A,A,A / LA1,LA2,LA2,LA2
S,S,S,S / HA1,HA2,HA2,HA2
A,A,S,S / LA1,LA2,HA2,HA2
S,A,A,S,S / HA1,LA2,LA2,HA2,HA2

That's it I think , thanks in advance.
You do not have the required permissions to view the files attached to this post.
B
7
S
2
Posts: 102
Reputation: 975

Post » Sun Mar 01, 2015 8:54 am

I dunno how they do it in fighting games. But my guess is that they use a timer and during X time they listen for another keypress.

So in short, while the timer is not 0, you add keystrokes to a variable. And when the Timer reaches is limit, the variable is reset.

The only downside i can see with this is that a normal attack that is not a combo would take a little longer to execute as you need a little delay before you execute the action. But the timer time needs to be really short.
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Sun Mar 01, 2015 9:05 am

Here is an example of how you can do it, I don't think it does exactly what you need, but it might give you some idea of how you can make it.

It just uses as list where each attack type is stored (Light attack, Heavy attack) When the list reaches 4 attacks, it will call the function "Execute attack" and in that function you can specify what should happen when a certain combo is made. In my example it only deals with up to 4 "Light attacks" but should show you how you could make the others if that is what you need.

Also it uses an automatic execute counter, so if the player haven't pressed any attack for 2 seconds it will just execute whatever attack combo is in the list. Anyway maybe It can give you some ideas of how to make what you want.

Attack_combo.capx
You do not have the required permissions to view the files attached to this post.
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Cool Gamez, marcoscodas and 9 guests