home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_05_jpcrate.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  795 b   |  53 lines

  1. #standard type crate generation cog.
  2. symbols
  3. message        startup
  4. message        arrived
  5.  
  6. thing          crateG
  7. thing          teleport1
  8. thing          teleport2
  9.  
  10. template       crateT
  11.  
  12. sector         checksector
  13.  
  14.  
  15. end
  16.  
  17. ## Code Section
  18. code                  
  19. startup:
  20.      player=getlocalplayerthing();
  21.      call createcrate;
  22.      return;
  23.  
  24. createcrate:
  25.      newcrate=CreateThing(crateT, crateG);
  26.      CaptureThing(newcrate);
  27.      movetoframe(newcrate, 1, 5);
  28.      return;
  29.      
  30. arrived:     
  31.      destroything(newcrate);
  32.      if (getthingsector(player)==checksector) {
  33.           teleportthing(player, teleport1);
  34.      }
  35.      else {
  36.           call createcrate;
  37.      }
  38.      return;
  39.  
  40.      
  41.  
  42. end
  43.      
  44.      
  45.      
  46.     
  47.  
  48.      
  49.      
  50.      
  51.      
  52.  
  53.