walkcycle blend animation

0 favourites
  • 3 posts
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

    +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.
    
  • That makes a lot of sense. Gonna try it tomorrow. :)

    Thanks!

    EDIT: It worked! Thanks, tulamide!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)