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

  1. # Droids Cog Script
  2. #
  3. # D0_skyway.cog
  4. #
  5. # Skyways cog
  6. #
  7. # Desc:                                                                 
  8. #    This is the "Wheel & Axle" puzzle for the Moisture Farm level.
  9. #
  10. #
  11. #          [MT]     Created
  12. # 1/16/98  [JP]     Modified for Moisture Farm Control Room. 
  13. #
  14. # (C) 1997 LucasLearningLimited. All Rights Reserved
  15.  
  16.  
  17.  
  18. symbols                     
  19. message             startup
  20. message             pulse
  21. message             entered
  22. message             exited  
  23. message             touched
  24.  
  25. surface             reset_switch        linkid=10
  26.            
  27. thing               wrench_fake
  28. thing               wrench              no link
  29. thing               gear
  30. thing               platform
  31. thing               water_sector0
  32. thing               water_sector1
  33. thing               water_sector2
  34. thing               platform_water_sector
  35. thing               light0
  36. thing               light1
  37. thing               light2
  38. thing               light3
  39.  
  40. sector              control_room
  41. sector              drain_room
  42. sector              platform_sector
  43.  
  44. flex
  45.  
  46. int
  47.  
  48. sound               reset_switch_broke
  49. sound               gear_wrench_move
  50. sound               water_gush
  51. sound               power_on
  52.  
  53. end
  54.  
  55. # =======================================
  56.  
  57.  
  58. ## Code Section
  59.  
  60. code 
  61.  
  62. startup:
  63.      print("startup");
  64.  //    setpulse(0.1);
  65.      attachthingtothing(wrench_fake,wrench);
  66.      return;
  67.      
  68. # =========================================================
  69.  
  70. activated:
  71.      if (GetSenderId() == 10)           // pressing reset button underwater
  72.      setwallcell(switch 
  73.      
  74.  
  75.  
  76. touched:
  77.      print("touched");
  78.      setpulse(0.1);
  79.      return;
  80.      
  81. entered:
  82.      print("entered!");
  83.      movetoframe(wrench,1,.1);
  84.      return;     
  85.      
  86. exited:
  87.      print("exited!");
  88.      stopthing(wrench);
  89.      return;
  90.  
  91. pulse:
  92. //     printflex(vectordist(playerpos,wrenchpos));
  93.  
  94.      player=getlocalplayerthing();
  95.      playerpos=getthingpos(player);
  96.      wrench_fakepos=getthingpos(wrench_fake);
  97.     
  98.  
  99.      printflex(vectordist(playerpos, wrench_fakepos));
  100.      if(vectordist(playerpos,wrench_fakepos)<.14) {
  101.           movetoframe(wrench, 1, .5);
  102.      }
  103.      else stopthing(wrench);
  104.      return;