I'm able to trigger an event(a text message) when I c_trace between the player and an entity(Imp_ent), however, I am unable to execute the same event when I attempt to c_trace 200 quants from the player and move within range of the entity. I think vec_rotate is a c-script command so I am using ang_add instead. Here is my code:
Code:
function enemy_trace()
{  VECTOR trace_dist;
   vec_set(trace_dist.x, vector(200, 0, 0)); //put 200 quants into trace_dist.x
   vec_add(trace_dist.x, player.x); //add 200x to player vector and store in trace_dist
   ang_add(trace_dist.x, player.pan); //rotate trace_dist angle by player.pan angle and store in trace_dist
	
	c_trace (player.x, trace_dist.x, IGNORE_ME + USE_BOX); //trace 200 quants from player.x?
	if (you == Imp_ent) // got the imp?
	{	
	imp_txt.flags |= VISIBLE; //display message if Imp_ent has been tagged 200 quants or less from player's position 
	}		        //and orientation
}

If I replace trace_dist.x with Imp_ent.x in c_trace, the message gets displayed immediately because Imp_ent is within sight. If I replace trace_dist.x with player.x + 1 or more, the message gets displayed when I move forward a small distance, even when the Imp_ent exceeds at least 700 quants from the player. Any help would be appreciated... Is there a solution in any AUM 69 or above? I have AUM 1-68.