Make NPC animate correctly when using pathfinder

0 favourites
  • 10 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • 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

  • 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 we can get to it that way)

  • Are you using sprite angle is between, because then it should work if you have rotate object set to yes in pathfinding properties.

  • 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

  • Please try again but save as a "single file" (.capx).

  • Sorry - try this...

    /s/1gj9zyulu5dzqrj/Pathfinder%20Animation%20issue.capx

  • Try Construct 3

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

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

  • <img src="https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/Ashampoo_Snap_2014.01.26_16h16m18s_003.png" border="0" />

    <img src="" border="0" /><img src="https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/Ashampoo_Snap_2014.01.26_16h15m48s_002.png" border="0" />

  • why not use:

    pug is between angles -45 : 45

    pug set direction to right

    instead of pathfinderbehaviour angle use spriteangle.

  • Thanks guys. That all makes sense. Working now. Really appreciate you taking the time to help me out!

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