home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / games / colobotdemo / colobotdemo10e.exe / help / Tant4.TXT < prev    next >
Text File  |  2001-07-03  |  891b  |  11 lines

  1. \b;Objectif
  2. Program a \l;winged shooter\u object\botfj; to hunt all ants in the region.
  3.  
  4. \t;Program
  5. In this swamp, a wheeled or tracked shooter is of little use. And ants, in opposition to spiders, keep moving: you can not just turn toward the closest ant, move forward and shoot.
  6.  
  7. The easiest way to solve the problem consists in flying at a height of 10 meters, aiming downward with \c;aim(-20);\n;, and approaching the ant with a conditional loop as long as the \l;distance\u cbot\dist; is greater than 20m. In this conditional loop, you must look for the closest ant, turn toward it, set the motors at full speed with \c;motor(1,1);\n;, and wait a little, for example 0.2 seconds. All these instructions must be repeated until the ant is at less than 20 meters. Then just shoot it.
  8.  
  9. \t;See also
  10. \l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
  11.