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

  1. # ========================================================================================
  2.  
  3. symbols
  4.     message    startup
  5.      message   user0
  6.      message   user1
  7.  
  8.     float     lightvalue=1.0 local
  9.      float     speed=0.0      local  
  10.      
  11.      thing     light0         nolink
  12.      thing     light1         nolink
  13.      thing     light2         nolink
  14.      thing     light3         nolink
  15.      thing     light4         nolink
  16.      thing     light5         nolink
  17.      thing     light6         nolink
  18.      thing     light7         nolink
  19.      thing     light8         nolink
  20.      thing     light9         nolink
  21.      thing     light10        nolink
  22.      thing     light11        nolink
  23.      thing     light12        nolink
  24.      thing     light13        nolink
  25.      thing     light14        nolink
  26.      
  27.      thing     xlight0         nolink
  28.      thing     xlight1         nolink
  29.      thing     xlight2         nolink
  30.      thing     xlight3         nolink
  31.      thing     xlight4         nolink
  32.      thing     xlight5         nolink
  33.      thing     xlight6         nolink
  34.      thing     xlight7         nolink
  35.      thing     xlight8         nolink
  36.      thing     xlight9        nolink
  37.      thing     xlight10        nolink
  38.      thing     xlight11       nolink
  39.      thing     xlight12       nolink
  40.      thing     xlight13       nolink
  41.      thing     xlight14       nolink
  42.      thing     xlight15       nolink
  43.  
  44.  
  45.     int        count            local
  46. end
  47.  
  48. # ========================================================================================
  49.  
  50. code
  51. startup:
  52.      lightvalue=1.35;
  53.      speed=0.0;
  54.      xlightvalue=0.45;
  55.      xspeed=0.0;
  56.      call changethelights;
  57.      return;
  58.  
  59. changethelights:
  60.     for (count = 0; count<=14; count=count+1) {
  61.         if (light0[count] >= 0) setthinglight(light0[count], lightvalue, speed);
  62.     }
  63.     for (xcount = 0; xcount<=15; xcount=xcount+1) {
  64.         if (xlight0[xcount] >= 0) setthinglight(xlight0[count], xlightvalue, xspeed);
  65.     }
  66.     
  67.      return;
  68.      
  69. user0:
  70.      print("flashing the lights");
  71.      lightvalue=0.0;
  72.      speed=0.2;
  73.      xlightvalue=0.0;
  74.      xspeed=0.2;
  75.      call changethelights;
  76.      
  77.      sleep(0.31);
  78.      lightvalue=1.5;
  79.      call changethelights;
  80.      
  81.      sleep(0.22);
  82.      lightvalue= 0.3;
  83.      call changethelights;
  84.      
  85.      sleep(0.47);
  86.      lightvalue=1.0;     
  87.      call changethelights;
  88.      
  89.      sleep(0.3);
  90.      lightvalue=0.3;     
  91.      call changethelights;
  92.      
  93.      sleep(0.47);
  94.      lightvalue=0.75;     
  95.      call changethelights;
  96.      
  97.      sleep(0.3);
  98.      speed=3.0;
  99.      lightvalue=0.3;     
  100.      call changethelights;
  101.     
  102.      return;
  103.      
  104. user1:
  105.      print("the power is coming back on");
  106.      lightvalue=1.5;
  107.      speed=3.0;
  108.      xlightvalue=.75;
  109.      xspeed=0.0;
  110.      call changethelights;
  111.      return;
  112.          
  113.  
  114.  
  115. end
  116.  
  117.