Animation angle depending on where actor is

Hi everyone, I am making a game where I have an enemy actor that chases you, the enemy is like a walking animation and when I move it needs to follow, so the animation neeeds to turn and keep following. I have got all the images on like every angle. Can Gamesalad do this?

So depending on where the user according to the enemy animation, the enemy has to turn and walk in that direction.
How can I make it know on what angle it is to the user?

Hope that makes sence!

Best Answer

  • SocksSocks London, UK.Posts: 12,822
    Accepted Answer
    Simply constrain the image to the angle of the enemy.

    I did something very similar, I can dig it out if you want.

Answers

  • ADSentertainmentADSentertainment Member Posts: 397
    edited January 2013
    watch this just replace the mouse position with the actor position that you want it to follow. I had this same problem a while ago as well.

    Having trouble with your game? Sounds like a personal problem.

  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2013
    . . . just replace the mouse position with the actor position.
    I think he's after something different - I think he wants his enemy animation to change depending on which direction the enemy is walking.
  • ADSentertainmentADSentertainment Member Posts: 397
    . . . just replace the mouse position with the actor position.
    I think he's after something different - I think he wants his enemy animation to change depending on which direction the enemy is walking.
    Oh, ok

    Having trouble with your game? Sounds like a personal problem.

  • sparx13sparx13 Member Posts: 97
    Thanks guys, I worked it out, I used Vector To Angle to work out the angle between the two actors and then depending on the angle made the enemy animation angle different.

    Thanks.
Sign In or Register to comment.