home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_02_minedoor.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  1.4 KB  |  70 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        linkid=2
  21. surface        switch1        linkid=2
  22. surface        fakesurface0   linkid=2
  23. surface        fakesurface1   linkid=2 
  24. surface        fakesurface2   linkid=2
  25. surface        fakesurface3   linkid=2 
  26.  
  27. thing          door   
  28.  
  29. end
  30.  
  31.  
  32. code
  33. startup:  
  34.      setthinglight(door, 1.0, 0.0);
  35.      doorsector=getthingsector(door);
  36.      setwallcel(switch0, 0);
  37.      setwallcel(switch1, 0);
  38.      return;
  39.      
  40. activate:
  41.      if (getsenderid()==2) {
  42.           setsectoradjoins(doorsector, 1);
  43.           setwallcel(switch0, 1);
  44.           setwallcel(switch1, 1);
  45.           movetoframe(door, 1, 3);
  46.           settimer(4);
  47.      }
  48.      return;
  49.      
  50. timer:
  51.      movetoframe(door, 0, 3);
  52.      return;
  53.      
  54. arrived:
  55.      if (getcurframe(door)==0) {
  56.           setsectoradjoins(doorsector, 0);
  57.           setwallcel(switch0, 0);
  58.           setwallcel(switch1, 0);
  59.      }
  60.      return;
  61.  
  62.  
  63.  end
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.