AI turn and animation?

I’m trying to figure out what controls my enemy’s AI so that when I turn I add a turn animation:

Know when to turn before turning, stop, make an animation, turn, and continue, but I don’t know how I get the variable of when it turns or how much it turns.

Any information on this would help me a lot.