Animation Looping and Pathfinding

Get help using Construct 2

Post » Wed May 22, 2013 2:16 am

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:
https://dl.dropboxusercontent.com/u/64691866/PathFindingAnimationIssue.capx
B
5
Posts: 16
Reputation: 609

Post » Wed May 22, 2013 4:47 pm

B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed May 22, 2013 6:20 pm

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.
B
5
Posts: 16
Reputation: 609

Post » Wed May 22, 2013 8:55 pm

% 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)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: Renfd, supreme676 and 27 guests