Hi,
I wrote a mod that allows me to unequip any spell the player may have in his left hand by pressing a configurable key.
I assumed the mod would work for unequipping scrolls too but it seems that isn't the case.
This is the fragment of code in charge of identifying spells equipped in the player's left hand and then unequipping them:
if(PlayerRef.GetEquippedItemType(0) != 9) returnelse Spell ELHS = PlayerRef.GetEquippedSpell(0) As Spell PlayerRef.UnequipSpell(ELHS, 0)endif
The GetEquippedItemType function doesn't have a category for scrolls. Also, I didn't see anything in the GetEquippedSpell or UnequipSpell that suggested those functions wouldn't work for scrolls. So I'm a bit puzzled as to why my script won't work for scrolls. Any ideas what should I change/consider in order to make it work for scrolls?
Thanks in advance!
EDIT: ok, I'm stupid. Unlike spells, favorited scrolls that are currently equiped can be unequipped just by pressing the hotkey attached to them. Since vanilla hotkeys already do for scrolls what my custom hotkey does for spells, there is no need to extend my script to include scrolls.