Hello,

you can use "vec_dist" and "vec_to_angle" for the player-enemy distance and facing. There are good examples in the manual for that.
And you should check the latest AUMs. They contain realy good "Basic AI" Tutorials.

regards