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

  1. extern void object::Recharge2()
  2. {
  3.     point  start;          // variable for initial pos.
  4.     object item;           // info. about power station
  5.     
  6.     start = position;      // stores initial position
  7.     
  8.     item = radar(PowerStation); // looks for station
  9.     goto(item.position);   // goes to the power station
  10.     
  11.     while ( energyCell.energyLevel < 1 )
  12.     {
  13.         wait(1);            // waits until recharged
  14.     }
  15.     
  16.     goto(start);           // comes back to initial pos.
  17.     message("Recharge completed");
  18. }
  19.