"Equipping" a Potion On Pickup

Post » Thu Feb 21, 2013 3:29 am

I'm trying to get the player to auto consume a potion. Right now the pickup works fine but I can't seem to get them to consume or equip it when it enters the player's inventory.


Scriptname PotionConsume extends ReferenceAlias  Quest Property HoSQuest2Ref  Auto  Actor Property PlayerRef  Auto  ReferenceAlias Property Alias_Potion  Auto  Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer)     if (newContainer == PlayerRef)           Debug.Notification("If Passed")           PlayerRef.EquipItem(Alias_Potion.GetReference())      endifEndEvent

I actually didn't receive the notification in game either for the debug. The npc is "handing" the item to the player through additem with the alias ref. Is there something that has to be handled differently when the player is in dialogue?

I believe that same code logic worked on another item in our quest as well. Just not consuming the item.
User avatar
Amysaurusrex
 
Posts: 3432
Joined: Wed Aug 09, 2006 2:45 pm

Return to V - Skyrim