Hello! this is the second time i am asking help for my problem to turn the entities smothly toward the target, i hope someone would solve it this time.

Here is my code... The commented lines of code are those nonworking codes that some people told me to try last time but didn't work.

the ent_faceto & ent_turnto works but bcoz of wait_for() it freezes the rest of the code until it turns to the target.

Code:
if(my.state==reachcover)
{	
	if ((c_scan(my.x, my.pan, vector(360, 60, 5000), IGNORE_ME | IGNORE_FLAG2 | SCAN_LIMIT) > 0) && (you.state == coverplace ))
	{
		dummy=you;			
		
		//	ent_turnto & ent_faceto freezes the code till it turns toward target
		//		ent_faceto(me,dummy.x,1);
		//		wait_for(ent_faceto);
		
		//it doesn't work too the entity runs toward random directions.
		//				if(abs(ang(dummy-my.pan)) > 1) 
		//				{
		//					my.pan += clamp(ang(dummy-my.pan),-5,5)*time_step;
		//				}
		//				else 	//	your entity faces now the desired direction
		//				{		
		
			vec_set(a,dummy.x);
			vec_sub(a,my.x);
			vec_to_angle(my.pan,a);
			
			c_move (my, vector(8*time_step,0,0), nullvector, GLIDE | IGNORE_PASSABLE);
			ent_animate(my, "run", my.animation, ANM_CYCLE); 
			my.animation += 8 * time_step;
			
			if(vec_dist(my.x,dummy.x)<1)
			{
				my.state=iamincover;
				set(dummy,FLAG2);
			}
			
		//				}
		
	}
}



Someone please find a solution. Thank You