I think the below works too, from the manual:

Code:
function turn_towards_target()
{
  var temp1;
	
  vec_set(temp1,player.x); 
  vec_sub(temp1,someAgent.x);
  vec_to_angle(someAgent.pan,temp1); 
  
} 


Though I'm unsure how to make the rotation be tied to a "time_step".


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07