You could do something like this:
Code:
action enemyki()
{
  while(1)
  {
    if(vec_dist(my.x,player.x)<900)
    {
     //KI-code
    }
    wait(1);
  }
}



Last edited by Nicotin; 10/19/09 14:39.