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

  1. # Droids Cog Script
  2. #
  3. # D0_skyway.cog
  4. #
  5. # Skyways cog
  6. #
  7. #
  8. #
  9. # [MT]
  10. #
  11. #
  12. # (C) 1997 LucasLearningLimited. All Rights Reserved
  13.  
  14.  
  15.  
  16. symbols                     
  17. message        startup
  18. message        shutdown
  19. message        timer
  20. message        pulse
  21. message        entered
  22. message        user0               //helped out droid
  23.  
  24. sector         crossedtramssector       linkid=1
  25. sector         finishsector
  26.  
  27. sound          goalsound=00tAccomplish.wav        local
  28.  
  29. end
  30.  
  31.  
  32. ## Code Section
  33. code    
  34.  
  35. startup:
  36.      player=getlocalplayerthing();  
  37.      undertimelimit=1;
  38.      helpedoutdroid=0;
  39.      if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
  40.           if (dwCheckDroidCaps(8)==0) SetInv(player, 2, 1);                             //2:tractor tread
  41.           else SetInv(player, 2, 0);  
  42.           if (dwCheckDroidCaps(16)!=0) SetInv(player, 3, 1);
  43.           else SetInv(player, 3, 0);     
  44.      }
  45.      if (getdifficulty()==1) {
  46.           if (dwCheckDroidCaps(2048)!=0) SetInv(player, 1, 1);    
  47.      }          
  48.      if ( (getdifficulty()==1)||(getdifficulty()==2) ) {
  49.           if (dwCheckDroidCaps(1048576)!=0) SetInv(player, 5, 1);                             //2:tractor tread
  50.           else SetInv(player, 5, 0);                
  51.      }                                                                                     
  52.      if (getdifficulty()==2) {     
  53.           if (dwCheckDroidCaps(65536)!=0) SetInv(player, 7, 1);
  54.           else SetInv(player, 7, 0);    
  55.           SetTimer(210);                                                        
  56.      }          
  57.      return;
  58.  
  59. shutdown:
  60.      if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
  61.           if (getthingsector(player)==finishsector) {
  62.                SetInv(player, 6, 1);          //1:finished the level
  63.           }
  64.           else SetInv(player,6,0);
  65.      }
  66.      return;  
  67.      
  68. timer:
  69.      print("you blew it");
  70.      SetInv(player, 6, 0);
  71.      return;
  72.      
  73. user0:
  74.      if ((getdifficulty()==1)||(getdifficulty()==2)) {
  75.           setinv(player, 4, 1);
  76.           playsoundlocal(goalsound, 1.0, 0.0, 0);
  77.      }
  78.      helpedoutdroid=1;     
  79.      playsoundlocal(goalsound, 1.0, 0.0, 0);
  80.      sleep(3);
  81.      dwplaycammyspeech(16009, "t2ca010.wav", 15, 2);     
  82.  
  83.      return;             
  84.      
  85.  
  86.   
  87. end
  88.  
  89.  
  90.  
  91.  
  92.