home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_t6_objectives.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  2.0 KB  |  86 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.  
  22. sector         finishsector
  23. sound          goalsound=00tAccomplish.wav        local
  24.  
  25. int                undertimelimit        local
  26. end
  27.  
  28. ## Code Section
  29. code    
  30.  
  31. startup:
  32.      player=getlocalplayerthing();    
  33.      playermass=(getthingmass(player)/2.2);
  34.      undertimelimit=1;
  35.      if (getdifficulty()==1) {
  36.           if (dwCheckDroidCaps(8)==0) SetInv(player, 2, 0);                          // not a biped?
  37.           else SetInv(player, 2, 1);                
  38.      }                                                                                     
  39.      if ((getdifficulty()==2)||(getdifficulty()==0)) {     
  40.           if (dwCheckDroidCaps(524288)==0) {
  41.                SetInv(player, 2, 0);                        //2:tractor tread
  42.           }
  43.           else {
  44.                SetInv(player, 2, 1);                                                               
  45.          }
  46.      }       
  47.      if (getdifficulty()==2) {
  48.           if (playermass<200) setinv(player, 5, 1);
  49.           else setinv(player, 5,0);    
  50.           SetTimer(180);
  51.      }   
  52.      if (dwcheckDroidCaps(1048576)==0) setinv(player, 3, 0);
  53.      else setinv(player, 3, 1);
  54.      return;
  55.  
  56.      
  57. timer:
  58.      print("times up!");
  59.      undertimelimit=0; 
  60.      return;
  61.      
  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.      }
  70.      if (getdifficulty()==2) {               
  71.           if ( (undertimelimit==1)&&(getthingsector(player)==finishsector) ) SetInv(player, 4,1);                                //4:Under five min.
  72.  
  73.      }
  74.      return;  
  75.      
  76.            
  77.  
  78.   
  79. end
  80.  
  81.  
  82.  
  83.  
  84.