home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2001 November / Gamestar_34_2001-11_cd1.bin / DEMA / colobotdemoe.exe / script / tprot1.txt < prev    next >
Text File  |  2001-07-23  |  343b  |  25 lines

  1. extern void object::Solution( )
  2. {
  3.     object    item;
  4.     float    dir, dist;
  5.  
  6.     while ( true )
  7.     {
  8.         do
  9.         {
  10.             item = radar(AlienAnt, 0, 360, 0, 100);
  11.         }
  12.         while ( item == null );
  13.  
  14.         dir = direction(item.position);
  15.         turn(dir);
  16.  
  17.         dist = distance(item.position, position);
  18.         if ( dist < 40 )
  19.         {
  20.             fire(0.2);
  21.             wait(2);
  22.         }
  23.     }
  24. }
  25.