Fighting timing

Get help using Construct 2

Post » Mon Mar 25, 2013 5:18 am

Hi

I want to emulate this behavior of fighting games:

When the player hits the attack button,
1) the avatar plays a starting animation (during which frames the player is vulnerable)
2) then the player performs the hitting animation (during which frames, the player is inflicting damage)
3) then the player performs the cool down animation (during which frames, the player is vulnerable, and cannot attack).

The starting animation might be 8 frames long, the hitting 10 frames long, and the cool down 12 frames long.

Im a little stuck in the implementation. My first theory was to do this:



but that doesnt work.

B
7
S
3
G
3
Posts: 53
Reputation: 2,459

Post » Mon Mar 25, 2013 5:29 am

Update: I added a wait event in between animations, and it kinda works. The thing now is that if I press constantly the attack button, the commands start on top of each other, effectively negating the cool down period.
B
7
S
3
G
3
Posts: 53
Reputation: 2,459

Post » Mon Mar 25, 2013 5:35 am

check this https://www.dropbox.com/s/xbztl89iqlhe5ph/Untitled.png
that are my events to do a hit combo.
PD: when i set check to hit i have another event that plays the animation its like:
+system every tick
- set animation to "mona_"&check
B
17
S
2
G
2
Posts: 82
Reputation: 1,712

Post » Mon Mar 25, 2013 5:38 am

well you need the condition like in the link:
on d pressed and is animation mona hit playing (reverted), this is important because it will limit the hits when you press d, in other words you will only hit when the animation is finished ,if you know what i mean, i dont know how explain it xDhaifisch2013-03-25 05:39:11
B
17
S
2
G
2
Posts: 82
Reputation: 1,712

Post » Mon Mar 25, 2013 10:37 pm

thanks haifisch.

By the way, why do you disable the platform behavior at the beginning of the hit?
B
7
S
3
G
3
Posts: 53
Reputation: 2,459

Post » Tue Mar 26, 2013 12:12 am

that is for my game :P ,i dont want them to move when they hit.
B
17
S
2
G
2
Posts: 82
Reputation: 1,712


Return to How do I....?

Who is online

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