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

  1. # d_0 JawaTalk.cog
  2. #    
  3. # A simple communiCog ripped off from Doug
  4. #
  5. # Desc:
  6. #      Sucker Fool I stole it from Matt, I didn't even change
  7. #    The variable GONK.     - Love Ya, Doug
  8. #    
  9. #    Yeah, well I stole it back so bite me.  --Matt
  10. # 12/08/97 DGS    Stole from Matt's GonkTalk
  11. # 12/08/97 MST Stole back from Doug's JawaTalk
  12. #-----------------------------------------------------------------------------
  13.  
  14. symbols
  15. message        startup
  16. message        arrived
  17. message        activate
  18. message        timer
  19.  
  20. surface        switch0
  21. surface        switch1
  22.  
  23. thing          door
  24.  
  25. end
  26.  
  27.  
  28. code
  29. startup:  
  30.      setwallcel(switch0, 1);
  31.      setwallcel(switch1, 1);
  32.      doorsector=getthingsector(door);
  33.      setsectoradjoins(doorsector, 0);
  34.      return;
  35.      
  36. activate:
  37.      setsectoradjoins(doorsector, 1);
  38.      setwallcel(switch0, 2);
  39.      setwallcel(switch1, 2);
  40.      movetoframe(door, 1, 3);
  41.      settimer(4);
  42.      return;
  43.      
  44. timer:
  45.      movetoframe(door, 0, 3);
  46.      return;
  47.      
  48. arrived:
  49.      if (getcurframe(door)==0) {
  50.           setwallcel(switch0, 1);
  51.           setwallcel(switch1, 1);
  52.           setsectoradjoins(doorsector, 0);
  53.      }
  54.      return; 
  55.  
  56.  
  57.  end
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.