can't help you with the follow-only-bad-guy part, cause I don't know what your bad guy is, but I have some code for a tower rotating towards a player:

Code:


action geschuetzturm
{
while(1)
{
if(vec_dist(my.x, menu_patroule.x) < 200) //is that a good solution?
{
vec_diff(temp,menu_patroule.x,my.x);
vec_to_angle(temp,temp);
my.pan += ang(temp.pan - my.pan)*0.1*time_step;
}
wait(1);
}
}




try that...
Micha


~"I never let school interfere with my education"~
-Mark Twain