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

  1. \b;Programs dispatched by Houston
  2. We have improved the recharge program. When it arrives at the \l;power station\u object\station;, the bot does not wait exactly 5 seconds, but only until the \l;power cell\u object\power; is fully charged. After the bot is back at the initial position, it displays a message on the screen.
  3. \c;
  4. \s;extern void object::Recharge2()
  5. \s;{
  6. \s;    \l;point\u cbot\type;  start;          // variable for initial pos.
  7. \s;    \l;object\u cbot\type; item;           // info. about power station
  8. \s;    
  9. \s;    start = position;      // stores initial position
  10. \s;    
  11. \s;    item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // looks for station
  12. \s;    \l;goto\u cbot\goto;(item.position);   // goes to the power station
  13. \s;    
  14. \s;    \l;while\u cbot\while; ( \l;energyCell.energyLevel\u cbot\object; < 1 )
  15. \s;    {
  16. \s;        \l;wait\u cbot\wait;(1);           // waits until recharged
  17. \s;    }
  18. \s;    
  19. \s;    \l;goto\u cbot\goto;(start);           // comes back to initial pos.
  20. \s;    \l;message\u cbot\message;("Recharge completed");
  21. \s;}
  22. \n;
  23. \b;Archives
  24. Index of the programs dispatched in former missions:
  25.  
  26. o  \c;\l;SwitchCell1\u mllune1;\n;
  27. o  \c;\l;Recharge1\u mllune4;\n;
  28.