here is a sample I was playing with last week that sets units animation based on the moving angle.
you select units with the left mouse button, and send them to a location with the right mouse button.
I borrowed the player unit from the Demonoire game demo...
in another sample I am still working on I use pathfinding to choose a path for the units, but then I use MoveTo to get the units there. Pathfinding only takes units close to the destination. If you want units to got to an exact spot you have to use MoveTo, add waypoints found with pathfinding, and then set the final waypoint to the spot you want the unit to arrive at.
Thank you Allan, this has just what I needed. Through system I can call the NPCs and use the same code as Zelda posted for the angles and the animation changes, I just didn't know where to start with that.
I see that you used a Direction state to tie the angles to the animations, now I understand it clearly.