Make NPC animate correctly when using pathfinder

Get help using Construct 2

Post » Sun Jan 26, 2014 12:03 pm

Hi all,

I'm a beginner with all this stuff so bear with me!

Am struggling to get the animations of my enemy sprite working correctly when using Pathfinder.

The game is top down but 4 direction like Zelda.

I have set the enemy sprite up so if the Pathfinder Moving Angle is between for example 46 degrees and 135 degrees then the animation for walking down plays and this works for left, and up as well but I can't find a way of making it work for right.

It doesn't work with -45 to 45 degrees or 315 to 45.

I've tried looking at a couple of tutorial vids but hasn't really helped. Anyone know what I'm doing wrong?

Thanks
B
5
Posts: 19
Reputation: 323

Post » Sun Jan 26, 2014 12:47 pm

First thought is that it sounds like it should be working - can you post a capx (as your rep is not high enough yet you can't post a link but it you put your file into something like dropbox and provide the address after the www. we can get to it that way)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sun Jan 26, 2014 1:12 pm

Are you using sprite angle is between, because then it should work if you have rotate object set to yes in pathfinding properties.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jan 26, 2014 2:28 pm

Thanks guys. I'm sure I'm just doing something really dumb and it's probably really straightforward to fix. So this is the link after the .com of Dropbox

/s/913btj8mrp9jre0/New%20project.caproj
B
5
Posts: 19
Reputation: 323

Post » Sun Jan 26, 2014 3:05 pm

Please try again but save as a "single file" (.capx).
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sun Jan 26, 2014 3:19 pm

Sorry - try this...

/s/1gj9zyulu5dzqrj/Pathfinder%20Animation%20issue.capx
B
5
Posts: 19
Reputation: 323

Post » Sun Jan 26, 2014 4:13 pm

OK two ways I can think of

make your

pug right animation the first choice and have no condition (move it above the other 3 choices and then just delete the condition which will force it to choose the right animation and then swap to the other three as needed
or

use OR

so your condition would become

angle is between 315 and 360 degreed

OR

angle is between 0 and 45 degrees

THEN choose right animation

Make sense ?

edit (spelling)RamPackWobble2014-01-26 16:14:50
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sun Jan 26, 2014 4:18 pm





August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sun Jan 26, 2014 4:49 pm

why not use:

pug is between angles -45 : 45
pug set direction to right

instead of pathfinderbehaviour angle use spriteangle.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jan 26, 2014 7:36 pm

Thanks guys. That all makes sense. Working now. Really appreciate you taking the time to help me out!
B
5
Posts: 19
Reputation: 323

Next

Return to How do I....?

Who is online

Users browsing this forum: MoscowModder and 11 guests