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

  1. # Droids COG Script
  2. #
  3. # 03_sander.cog
  4. #
  5. # Cog designed to generate sand for the counterweight
  6. #
  7. #
  8. # Desc:
  9. #     02/03/98 [DGS]    Created
  10. #    02/12/98 [JP]  Modified to be used for the Moisture Farm level.
  11. # ========================================================================================
  12.  
  13. symbols
  14. message        startup
  15. message        pulse
  16. message          user0
  17. message        user1
  18. message        user2
  19. message        timer
  20.  
  21. thing        spout1a
  22. thing         spout1b
  23. thing        spout1c
  24.  
  25. thing        spout2a
  26. thing         spout2b
  27. thing        spout2c
  28.  
  29.  
  30. template    large_part
  31. template    fine_part
  32.  
  33.  
  34. int        rock=0
  35. int        l_color=0
  36. int        move=10
  37. flex        l_size=0
  38. flex        l_speed=0.5     local      
  39.  
  40. sound     watertop=FLYt7SndStrm.wav local
  41. sound     waterbottom
  42. int       top=-1         local
  43.  
  44. end
  45.  
  46. code
  47. startup:
  48.      top=-1;
  49.     return;
  50.  
  51.  
  52. user0:        //stop
  53.     setpulse(0);
  54.     return;
  55.  
  56. user1:        //Fill top
  57.      spoutta = spout1a;
  58.      spouttb = spout1b;
  59.      spouttc = spout1c;
  60.      if (top==-1 ) {
  61.           top=playsoundthing(watertop, spout2b, 1, -1, -1, 0x1);
  62.           setpulse(0.05);
  63.      }         
  64.      return;
  65.  
  66. user2:        //Fill top
  67.      spoutta = spout2a;
  68.      spouttb = spout2b;
  69.      spouttc = spout2c;
  70.      if (top==-1) {
  71.           top=playsoundthing(watertop, spout2b, 1, -1, -1, 0x1);
  72.           setpulse(0.05);
  73.      }
  74.      return;
  75.  
  76.     
  77. pulse:
  78.     creatething(large_part,     spoutta);
  79.     creatething(fine_part,         spoutta);
  80.     creatething(large_part,     spouttb);
  81.     creatething(fine_part,         spouttb);
  82.      creatething(large_part,     spouttc);
  83.     creatething(fine_part,         spouttc);
  84.      settimer(0.1);
  85.      
  86.     return;
  87.      
  88. timer:
  89.      print("timered");
  90.      stopsound(top, 0.7);
  91.      top=-1;
  92.      print("soundstopped");
  93.      return;
  94.      
  95. end
  96.  
  97.  
  98.  
  99.  
  100.