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

  1. # Jedi Knight Cog Script
  2. #
  3. # POW_BACTA.COG
  4. #
  5. # POWERUP Script - Bacta tank
  6. #
  7. # [YB & CYW]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10.  
  11.  
  12. symbols
  13.  
  14. thing       powerup                          local
  15. thing       player                           local
  16. int         bin=16                           local
  17. flex        amount                           local
  18.  
  19. message     activate
  20. message     taken
  21. sound          powerupSound=NRGbattery.wav        local
  22.  
  23. end
  24.  
  25. # ========================================================================================
  26.  
  27. code
  28.  
  29. taken:
  30.      player = getlocalplayerthing();
  31.      amount = GetInv(player, bin);
  32.      powerup = GetSenderRef();
  33.      print("small battery taken");
  34.      if (amount < GetInvMax(player, bin))
  35.      {     
  36.           dwFlashInventory(); 
  37.           dwplaycammyspeech(0, "ghca002.wav", 0.1, 1);
  38.           playsoundlocal(powerupSound, 1.0, 0.0, 0);
  39.           destroything(powerup);
  40.           SetInvAvailable(player,bin,1);  
  41.           ChangeInv(player, bin, 1);
  42.       }
  43.      return;
  44.