How do I play attack animation once

Get help using Construct 2

Post » Sat Jun 24, 2017 6:36 am

I've been looking for this answer on the forum and just can't find it.

I have a 4-direction character (up, down, left, right) and I'm controlling their animation based on the angle of motion.

However, I also need the attack, hit, etc animations the play based on the direction.

How do you trigger the animation based on direction without a wait condition?
B
9
S
4
G
1
Posts: 43
Reputation: 1,438

Post » Sat Jun 24, 2017 8:03 am

there is a function (event) called "On Animation Finished", which will trigger an action once the current animation ends. i believe that's what you're looking for.
B
23
S
12
G
1
Posts: 109
Reputation: 2,801

Post » Sat Jun 24, 2017 9:17 pm

I gave it a try, however it doesn't allow for ongoing animations.

Right now I'm using angles to determine the animation.

If moving
-> if angle between 0 and 90
--> set animation walk_up
---> if attack pressed
----> set animation attack_up
-----> on animation complete
------> set animation walk_up
[SOLVED]
I solved it but it cost me 35 events.

Here is the .capx
https://www.dropbox.com/s/k3bjn3yzk88um ... .capx?dl=0
B
9
S
4
G
1
Posts: 43
Reputation: 1,438


Return to How do I....?

Who is online

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