How to detect when Restore Health potions are used

Post » Thu May 03, 2012 12:24 pm

Is there a way to detect when Restore Health potions are used when they work instantly because they have no duration - without attaching a script to the potions, of course?

GetTotalActiveEffectMagnitude FOHE and GetTotalActiveEffectMagnitude REHE return 0 because the potions work instantly.

(As an aside, I found that any access to FOHE and REHE (and possibly any other MagicEffect codes) in Nehrim.esm, silently halts the script.)
User avatar
LittleMiss
 
Posts: 3412
Joined: Wed Nov 29, 2006 6:22 am

Post » Thu May 03, 2012 3:55 pm

You can use the OnDrinkPotion event handler for that.
User avatar
Brian Newman
 
Posts: 3466
Joined: Tue Oct 16, 2007 3:36 pm

Post » Thu May 03, 2012 11:14 am

Hey MatH, Thanks! That should also get me around the problem of the script failing with no crashes when in Nehrim!
User avatar
Georgia Fullalove
 
Posts: 3390
Joined: Mon Nov 06, 2006 11:48 pm


Return to IV - Oblivion