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

  1. symbols
  2. message        startup
  3. message        arrived
  4. message        activate
  5.  
  6. thing          baffle
  7.  
  8. int            count=0        local
  9.  
  10. cog            baffleMcog
  11.  
  12. sound          bafflewav=swt02baffle.wav
  13.  
  14. end
  15.  
  16. code
  17. startup:
  18.      count=0;
  19.      return;
  20.      
  21. arrived:
  22.      count=count+1;  
  23.      if (count%12==0) jumptoframe(baffle, 0, getthingsector(baffle));
  24.      if ((count-9)%12==0) sendmessage(baffleMcog, user0);   //generator one online 
  25.      else sendmessage(baffleMcog, user1);                   //generator one OFFLINE
  26.      return;
  27.      
  28. activate:
  29.      if (dwGetArmStrength() < 7) {          
  30.           dwplaycammyspeech(16022, "t3ca008.wav", 20, 2);
  31.           return;    
  32.      }          
  33.  
  34.      if (ismoving(baffle)!=0) {
  35.           print("can't move it");
  36.           return;
  37.      }
  38.      else {
  39.           rotatepivot(baffle, 1, 1);
  40.           playsoundthing(bafflewav, baffle, 1.0, -1, -1, 0);
  41.      }
  42.      return;
  43.      
  44. end
  45.  
  46.  
  47.  
  48.