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

  1. #
  2. # Droids Cog Script
  3. #
  4. # 03_corrosioncheck.cog
  5. #
  6. # Desc: 
  7. #     Will check if there's a corrosion head on in the level, sends a pulse to see if he turns it on, then sends messages     
  8. #    to the individual corrosion cogs...
  9. # 1/27/98    [JP]         Created 
  10. #
  11. # <C> 1998 LucasLearningLimited.  All Rights Reserved--------------------------------------------------------------------------------
  12.  
  13.  
  14. symbols
  15.     
  16.        message    startup
  17.      message   pulse
  18.      message   timer
  19.      message   user1
  20.      message   user2
  21.      message   user3
  22.      message   user4
  23.      message   user5
  24.          
  25.      cog       c1
  26.      cog       c2
  27.      cog       c3
  28.      cog       c4
  29.      cog       c5
  30.      
  31.      int       cor_toggle=0 local
  32. end
  33.  
  34. ## Code Section
  35. code
  36. startup:
  37.      player=getlocalplayerthing();
  38.      cor_toggle=0;
  39.      if  (dwCheckDroidCaps(256))  //correct head
  40.      {
  41.      setpulse(0.1);
  42.      print("c sensor on");
  43.      }
  44.      return;
  45.      
  46. pulse:
  47.     if(GetInv(player, 12))
  48.           {
  49.                //print("here so far");
  50.              if( (IsInvActivated(player, 12) == 1) && (cor_toggle == 0)  )//c.head on
  51.                     {
  52.                     cor_toggle = 1;
  53.                     sendmessage(c1, user1);    //it's on, so that textures change
  54.                     sendmessage(c2, user1);
  55.                     sendmessage(c3, user1);
  56.                     sendmessage(c4, user1);
  57.                     sendmessage(c5, user1);
  58.                     print("c sent");    
  59.                     }
  60.                    
  61.              else if((IsInvActivated(player, 12) == 0) && (cor_toggle == 1))//c.head off
  62.                     {
  63.                     print("the head is off");
  64.                     cor_toggle = 0;
  65.                     sendmessage(c1, user2);
  66.                     sendmessage(c2, user2);
  67.                     sendmessage(c3, user2);
  68.                     sendmessage(c4, user2);
  69.                     sendmessage(c5, user2);    
  70.                     }
  71.          }
  72.  
  73.  
  74. end
  75.  
  76.