Mansh00ter Posted February 25, 2012 Share Posted February 25, 2012 So. I have a potion-type item, but I want to attach a condition if the player can actually drink it. If the condition is not met, a message should display and the potion should not be consumed.A caveat: this must work on multiple different items with minimal modification of the script; I know I could script in reimbursement (add back 1 potion of that type) but that would require me knowing exactly which potion to add back to player inventory. So far I have no idea how to either prevent the player from consuming the potion, or reference the potion dynamically so I can reimburse the player. Any ideas? Link to comment Share on other sites More sharing options...
tunaisafish Posted February 25, 2012 Share Posted February 25, 2012 Not tested, but an idea :) I think the drinking the potion from inventory run the OnActivate event. So maybe if you block the 'drink' action with BlockActivation(), that means that your event code could handle the logic.If it is actually ok to drink then run "Activate(Game.GetPlayer(), True)" in your logic. You won't need to reimburse the potion then, but there's GetBaseObject() if you need it. Link to comment Share on other sites More sharing options...
Recommended Posts