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

  1. # Droids Cog Script
  2. #
  3. # D0_skyway.cog
  4. #
  5. # Goals for catapult 
  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        user3
  20. mesage         user4
  21. message        entered
  22. message        timer
  23.  
  24. sector         finishsector
  25. sector         droidsafesector
  26.  
  27. thing          Edroid
  28. thing          Rdroid
  29.  
  30.  
  31. sound          goalsound=00tAccomplish.wav        local
  32.  
  33. end
  34.  
  35. ## Code Section
  36. code    
  37.  
  38. startup:
  39.      gsj=0;
  40.      dankeschoen=0;
  41.      goodshot=0;
  42.      player=getlocalplayerthing();
  43.      playermass=getthingmass(player)/2.2;
  44.      if (getdifficulty()==0) {
  45.          if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1);                                  //2:tractor tread
  46.           else SetInv(player, 2, 0);               
  47.           if (playermass<=100) SetInv(player, 4, 1);  //4:between 750, 1500 kg
  48.           else SetInv(player, 4, 0);
  49.      }
  50.      else if (getdifficulty()==1) {
  51.           if (dwCheckDroidCaps(8)!=0) SetInv(player, 2, 1);                                       //2:biped 
  52.           else SetInv(player, 2, 0);           
  53.           if ((playermass>=125)&&(playermass<=175)) SetInv(player, 4, 1); //3:between 150, 250 kg
  54.           else SetInv(player, 4, 0);
  55.      }                                                                                        
  56.      else if (getdifficulty()==2) {                                                            
  57.           if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1);                                  //3:tractor tread
  58.           else SetInv(player, 2, 0);       
  59.           if ((playermass>750)&&(playermass<=2250)) SetInv(player, 4, 1);  //4:between 750, 1500 kg
  60.           else SetInv(player, 4, 0);
  61.           if (dwCheckDroidCaps(1048576)!=0) SetInv(player, 7, 1);         
  62.      }          
  63.      return;
  64.      
  65. shutdown:
  66.      if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
  67.           if (getthingsector(player)==finishsector) {
  68.                SetInv(player,6,1);                        //1:landed on pad          
  69.           }        
  70.           else SetInv(player,6,0);  
  71.      }
  72.      return;  
  73.      
  74. user3:
  75.      if (gsj==0) {
  76.           gsj=1;
  77.           print("good shot, janson!");
  78.           goodshot=1;
  79.           SetInv(player, 3, 1);
  80.           playsoundlocal(goalsound, 1.0, 0.0, 0);
  81.      }
  82.      return;
  83.      
  84. user4:
  85.      print("they're both safe!");
  86.      settimer(2);
  87.      return;
  88.      
  89. timer:
  90.      if (getthinghealth(Rdroid)>0) {
  91.      playsoundlocal(goalsound, 1.0, 0.0, 0);     
  92.      setinv(player, 5, 1);
  93.      }
  94.      return;
  95.      
  96. entered:
  97.      if (dankeschoen==0) {
  98.           dankeschoen=1;
  99.           print("entered the goalsector");
  100.           SetInv(player, 1, 1);   
  101.           playsoundlocal(goalsound, 1.0, 0.0, 0);
  102.      }
  103.      setthingvel(player, '0,-3.0,0');  
  104.      return;
  105.      
  106.  
  107.                  
  108. end
  109.  
  110.  
  111.  
  112.  
  113.