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

  1. extern void object::Solution()
  2. {
  3.     
  4.     object    item;
  5.     
  6.     aim(0);
  7.     
  8.     while (true)
  9.     {
  10.         while(radar(AlienWasp, 0, 360, 0, 20) == null)
  11.         {
  12.             item = radar(AlienWasp);
  13.             turn(direction(item.position));
  14.             motor(1,1);
  15.             
  16.             jet(0);
  17.             if(position.z > item.position.z)
  18.             {
  19.                 jet(-0.3);
  20.             }
  21.             
  22.             if(position.z < item.position.z - 1)
  23.             {
  24.                 jet(0.3);
  25.             }
  26.             
  27.             wait(0.2);
  28.         }
  29.         item = radar(AlienWasp);
  30.         turn(direction(item.position));
  31.         fire(1);
  32.     }
  33.     
  34. }
  35.