I have a script for a set of clothes I am making that removes the pipboy glove when you equip, and then reequips the glove when you unequip the item. Problem is, it only does the first half of that. Anyone know how to fix this? Code: scn VriskaClothesPipboyGlove
int InitGloveEquipped ; 0 = Glove not equipped, 1 = glove equipped initially
Begin OnEquip
if player.GetEquipped PipBoyGlove == 1 ; If this returns 1, it will run the following hooks:
set InitGloveEquipped to 1 ; Sets the integer to 1 so that it will equip the glove when unequipping the clothes
player.UnequipItem PipBoyGlove 1 1 ; Removes the glove (Wow what a surprise!!!) hiddenly
endif
End
Begin OnUnequip
if InitGloveEquipped == 1 ; Checks if the glove was equipped when you put on your clothes, returns 1 if it was.
player.AddItem pipboyglove 1 1
player.EquipItem PipBoyGlove 1 1
set InitGloveEquipped to 0 ; Sets the integer back to 0 so if the PC will (somehow) unequip the glove, it won't equip it again.
endif
End