Hi,
sorry i did not read the question well,
What you can do is get the position, save in a float for x,y,z separately (call it old x / y / z for example)
Then do a next frame action.
Then do a get position again (call it new x / y / z for example) and compare the floats with 'float compare' for each direction (x / y / z ) needed.
this way you can know which way the npc is going
after all directions compared loop back to the 1st state.
if (for example) old x is less than new x, set animator float x to -1