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

  1. \b;Programs dispatched by Houston
  2. Below is one of the programs that has been developed by our engineers.
  3. An upgrade on the previous program: the \l;grabber\u object\botgr;, on its way back from the converter, makes a stop, if necessary, at the \l;power station\u object\station; to recharge its power cell.
  4.  
  5. This program also works on \l;winged grabbers\u object\botgj;, if the \l;derrick\u object\derrick; is on another island than the \l;converter\u object\convert;.
  6. \c;
  7. \s;extern void object::CollectTitanium2()
  8. \s;{
  9. \s;    // 1) Variable definition.
  10. \s;    \l;object\u cbot\type;  item;            // info. about objects
  11. \s;    
  12. \s;    // 2) Goes toward the titanium ore and grabs it.
  13. \s;    item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// looks for titanium ore
  14. \s;    \l;goto\u cbot\goto;(item.position);     // goes to the position
  15. \s;    \l;grab\u cbot\grab;();                  // grabs the titanium
  16. \s;    
  17. \s;    // 3) Goes toward the converter and drops it.
  18. \s;    item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // looks for converter
  19. \s;    \l;goto\u cbot\goto;(item.position);     // goes to the position
  20. \s;    \l;drop\u cbot\drop;();                  // drops the titanium
  21. \s;    \l;move\u cbot\move;(-2.5);              // steps back 2.5 m
  22. \s;        
  23. \s;    // 4) If power cell half empty, recharges.
  24. \s;    if ( energyCell.energyLevel < 0.5 )
  25. \s;    {                               // if so:
  26. \s;        item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // looks for station
  27. \s;        \l;goto\u cbot\goto;(item.position);        // goes there
  28. \s;        \l;wait\u cbot\wait;(5);                    // waits
  29. \s;    }
  30. \s;}
  31. \n;
  32. \b;Archives
  33. Index of the programs dispatched in former missions:
  34.  
  35. o  \c;\l;CollectTitanium1\u mlcrys1;\n;
  36. o  \c;\l;Recharge2\u mltropi3;\n;
  37. o  \c;\l;Recharge1\u mllune4;\n;
  38. o  \c;\l;SwitchCell1\u mllune1;\n;
  39.