Item selection dialog

Post » Thu Jun 21, 2012 4:13 pm

I'm trying to improve the white phial by making it refill any potion the player puts in. I've got the code pretty much worked out, the only thing I'm missing is a method to allow the player to select a potion to put in.

The way I imagine it to work is that you equip the empty phial from your inventory which will then give you a message to select a potion to fill it with. Then you go to the Potions tab and attempt to drink a potion, but instead of it taking effect it is put into the phial and refills once a day. For that to work I need a way to receive an event which will indicate which potion the actor equips and then prevent that potion from taking effect. What is the best way to implement such an item selection?

UPDATE: I'm making progress, to receive item equip events I must add a magical effect to the actor, then an ActiveMagicEffect script can receive the events of the actor. I just need to find out how MagicalEffects work.

UPDATE2: Even better, using the already in-place quest for refilling the phial I can add a script to the player.

UPDATE3: Okay, everything is working. I've added a script to the player that extends ReferenceAlias and then listen for OnObjectEquipped events.
User avatar
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Post » Thu Jun 21, 2012 3:06 pm

For anyone interested, I've distributed the mod. You can get it on the Skyrim Nexus or Steam Workshop, it's called White Phial Realignment.
User avatar
Theodore Walling
 
Posts: 3420
Joined: Sat Jun 02, 2007 12:48 pm


Return to V - Skyrim