Rpg ai

Hey,
I am making a rpg game where i want people to walk around inside an mc of a tunnel i made. The Player controls ar good except for when i try to get the other people to work indepentantly. I created my own little prototype before, which,

detected a collision within certain positions at a speecified distance from the _x or _y postions of the mc and roatates accrodingly. Although this didnt work too well any ideas?

The car is alwayz moving in the direction of its rotation