home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / games / colobotdemo / colobotdemo10e.exe / help / mllune4.txt < prev    next >
Text File  |  2001-06-25  |  1KB  |  25 lines

  1. \b;Programs dispatched by Houston
  2. Below is a program that has been developed by our engineers. It allows you to recharge the \l;power cell\u object\power; of a bot: it goes to the closest \l;power station\u object\station;, waits 5 seconds, and comes back to the initial position.
  3.  
  4. Remark: If you click on an element of the program underlined in blue, your SatCom will display a text that explains this element. The texts that follow a double slash \c;//\n; are not part of the program, but are comments that help you to understand the program.
  5. \c;
  6. \s;extern void object::Recharge1()
  7. \s;{
  8. \s;    \l;point\u cbot\type;  start;          // variable for initial pos.
  9. \s;    \l;object\u cbot\type; item;           // info. about power station
  10. \s;    
  11. \s;    start = position;      // stores initial position
  12. \s;    
  13. \s;    item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // looks for station
  14. \s;    \l;goto\u cbot\goto;(item.position);   // goes to the power station
  15. \s;    \l;wait\u cbot\wait;(5);               // waits 5 seconds
  16. \s;    
  17. \s;    \l;goto\u cbot\goto;(start);           // comes back to initial pos.
  18. \s;}
  19. \n;
  20. \b;Archives
  21. Index of the programs dispatched in former missions:
  22.  
  23. o  \c;\l;SwitchCell1\u mllune1;\n;
  24.  
  25.