home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_dpow_bacta.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  1.6 KB  |  75 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=15                           local
  17. sound       pickupsnd=BactaPu1.wav           local
  18. flex        amount                           local
  19.  
  20. message     activate
  21. message     touched
  22. message     taken
  23. //message     respawn
  24.  
  25. end
  26.  
  27. # ========================================================================================
  28.  
  29. code
  30.  
  31. activate:
  32.    player = getlocalplayerthing();
  33.    amount = GetInv(player, bin);
  34.  
  35.      print("touched");
  36.    if (amount < GetInvMax(player, bin))
  37.    {
  38.      print("touched2");
  39.       powerup = GetSenderRef();
  40. //      TakeItem(powerup, player);
  41.      destroything(powerup);
  42.    }
  43.  
  44.    Return;
  45.  
  46. # ........................................................................................
  47.  
  48. taken:
  49.    player = GetSourceRef();
  50.    powerup = GetSenderRef();
  51.  
  52.    // Print("Bacta Tank");
  53.    jkPrintUNIString(player, bin);
  54.  
  55.    // Do effects.
  56.    PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0);
  57.    AddDynamicTint(player, 0.0, 0.0, 0.2);
  58.  
  59.    // Increment powerup amount.
  60.    ChangeInv(player, bin, 1.0);
  61.    SetInvAvailable(player, bin, 1);
  62.  
  63.    Return;
  64.  
  65. # ........................................................................................
  66.  
  67. respawn:
  68.    powerup = GetSenderRef();
  69.    PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0);
  70.  
  71.    Return;
  72.  
  73. end
  74.  
  75.