3/4 view - how to handle animation for different directions

charlieaf92charlieaf92 Member Posts: 84
edited November -1 in Working with GS (Mac)
My game has a 3/4 birdseye view. For one of the main actors, I am going to have 8 movement animations depending on the direction he is moving. This actor seeks a point on the map and is not controlled by the player.

I have a few questions about the best way to handle this in GS.

1. What is the best way to determine the direction that the actor is moving?

self Rotation won't work because if the actor is rotating then the images will rotate with it. So, the actor is always going to be facing the same direction - but the different image animations will give the illusion that he isn't.

I am thinking the best way may be to check the X, Y or the point the actor is moving towards against the actor's X, Y - but is there an easier way?

The next question - is there a way to flip animations or actor images? Instead of loading 8 sets of animations into GS I would prefer to only load 5 and just flip 3 of them to work for the other directions.

As usual - thanks!
Charlie

Comments

  • synthesissynthesis Member Posts: 1,693
    Question 1:
    Without knowing details...sounds like your initial assumptions are on the right track. You have to think simple with GS...no fancy way to do most things...it generally takes lots of stacked comparison rules to determine AI logic like that. Not sure if vector to angle would help or not...you might check into that.

    Question 2:
    No way to flip images/actors...have to have 2 sets of mirror images - 1 for each direction.
Sign In or Register to comment.