Animation Looping and Pathfinding

0 favourites
  • 4 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hey guys so I have been messing with this one for a little while now and I can't figure out what is happening

    So my problem is that 3 out of 4 walking animations will not loop. They are all set to loop in the animation editor and they are all set to 2 frames per second. There doesn't seem to be an issue with setting the correct animation because they all start just fine, but won't loop. WalkR is the one that works WalkL/D/U do not work.

    This is using the path finding demo so it works the same, just mouse click and the little zombie will walk to the clicked spot, after his first arrival he will start to path find all on his own so you can let him walk around.

    Also I have included a clone of the animation sprite in the upper right hand corner and if you hit W,A,S,D that will get the other animation sprite to preform his walking animations, they work just fine, but I was using it as a way to test for possible errors in my animation set up.

    Any help with this is greatly appreciated, thanks!

    Download:

    dl.dropboxusercontent.com/u/64691866/PathFindingAnimationIssue.capx

  • Something like this?

    PathFindingAnimationIssue.capx (r131)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh wow, thank you so much! This is working great!

    Just for curiosity sake do you think you could explain the actions you added, more specifically:

    Sprite 2: set anim to ceil(4*(1 + Sprite2.a/360)-0.5)%4

    I guess mostly I'm interested in what that %4 is doing at the end?

    Thanks again this is exactly what I was looking for.

  • % is the modulo operation, in case you didn't know. I think it's better explained in the link rather than me trying to explain it here.

    Have a look at this example and see if you can see what's going on:

    PathFindingAnimationIssue2.capx (r131)

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