walkcycle blend animation

Get help using Construct 2

Post » Thu Nov 14, 2013 3:09 am

Hey guys,

I'm trying to make my walkcycle animation blend the more seamlessly possible but I just can't seem to make it work.

When the animation changes to idle, it's supposed to play the start walking animation and then loop the idle one but it just locks in a frame of the start walking animation. When I lower the acceleration of the object it still freezes halfway through and he looks like he's iceskating.

As you can see, I'm using the speed to determine what animations should be played.

What am I doing wrong?

Prototype:
dl.dropboxusercontent.com/u/4859803/TestBuild/index.html


Events:
dl.dropboxusercontent.com/u/4859803/animprob.png
B
3
Posts: 4
Reputation: 383

Post » Thu Nov 14, 2013 4:42 am

It doesn't lock in a frame, it does what you told it to do. As long as the value is between 1 and 119, the animation is set to startWalk with the order to play from the beginning. And this condition is true for many ticks. So on every of those ticks, the animation is set to frame 0. Also, can you assure, that the speed will be exactly 120 (and not 119.99999 or 120.0000001, etc.)? It might be better to use "else" instead. For the first issue, just add a "trigger once" condition to both parts.

[code]
+p.direction = left
++Left arrow is down
+++ direction speed > 0 and direction speed <120
    trigger once ->Set animation startWalk
+++ else
    trigger once ->Set animation walkcycle

etc.
[/code]
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Thu Nov 14, 2013 5:05 am

That makes a lot of sense. Gonna try it tomorrow. :)

Thanks!

EDIT: It worked! Thanks, tulamide!waracle2013-11-14 15:33:15
B
3
Posts: 4
Reputation: 383


Return to How do I....?

Who is online

Users browsing this forum: Bootfit and 10 guests