home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / games / colobotdemo / colobotdemo10e.exe / script / kill1.txt < prev    next >
Text File  |  2001-06-15  |  440b  |  19 lines

  1. extern void object::KillAnt1()
  2. {
  3.     object item;             // info. about object
  4.     
  5.     goto(-30, 0);            // goes west
  6.     aim(0);                  // aims straight
  7.     
  8.     while ( true )           // always repeats:
  9.     {
  10.         item = radar(AlienAnt, 0, 360, 0, 40);
  11.         if ( item != null )  // ant detected ?
  12.         {
  13.             turn(direction(item.position));
  14.             fire(0.5);       // shoots 0.5 s
  15.         }
  16.         wait(1);             // waits 1 second
  17.     }
  18. }
  19.