//prevent movement if holding too close to player
if mouse_x < x + 20
   {
   if mouse_x > x - 20
      {
      if mouse_y < y + 20
         {
         if mouse_y > y - 20
            {
            exit;
            }
         }
      }
   }
move_towards_point(mouse_x,mouse_y,9);

