It's weird, I have your exact code running in SED and it works fine. The only other thing I can think of is that your player function has something else that's changing the YOU pointer for some reason. Try this.

entity* target_entity;

And then, in the player action, change the while loop to this:

Code:

while(1)
{
if(target_entity == null)
{
target_entity = c_scan(player.x, temp, vector(360, 60, 50),ignore_me);
}
wait(-0.25);
}



That might work?