home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_t4_objectives.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  2.3 KB  |  92 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        entered
  21.  
  22. sector         finishsector             mask=0xffff    linkid=1
  23.  
  24. thing          crate0
  25. thing          crate1
  26.  
  27. sound          goalsound=00tAccomplish.wav        local
  28.  
  29. int                undertimelimit        local
  30.  
  31. end
  32.  
  33. ## Code Section
  34. code    
  35.  
  36. startup:
  37.      player=getlocalplayerthing();
  38.      crateisthrudoor=0;
  39.      undertimelimit=1;
  40.      if (getdifficulty()==0) {
  41.           if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1);
  42.      }
  43.      if (getdifficulty()==1) {
  44.           if (dwCheckDroidCaps(8)!=0) SetInv(player, 2, 1);                             //2:biped
  45.           else SetInv(player, 2, 0);             
  46.      }                                                                                     
  47.      else if (getdifficulty()==2) {
  48.           setTimer(240);     
  49.           if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1);                        //3:tractor tread
  50.           else SetInv(player, 2, 0);                                                                      
  51.      }          
  52.      return;
  53.      
  54. entered:
  55.      if (getsenderid()==1) {
  56.           if ( (getsourceref()==crate0)||(getsourceref()==crate1) ) {
  57.                print("Back with one of those block rockin' beats!");
  58.                setinv(player, 3, 1);
  59.           }
  60.      }
  61.      return;
  62.     
  63.      
  64. shutdown:
  65.      if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
  66.           if (getthingsector(player)==finishsector) {
  67.                SetInv(player, 1, 1);          //1:finished the level
  68.           }
  69.           else SetInv(player,1,0);
  70.      }
  71.      if (getdifficulty()==2) {               
  72.           if ( (undertimelimit==1)&&(getthingsector(player)==finishsector) ) SetInv(player, 4,1);                                //4:Under three min.
  73.           else SetInv(player, 3, 0);                                
  74.      }
  75.      return;  
  76.  
  77.      
  78. timer:   
  79.      undertimelimit=0;
  80.      print("you're all out of time");
  81.      return;
  82.      
  83.             
  84.   
  85. end
  86.  
  87.  
  88.  
  89.  
  90.