testiger2 Posted November 18, 2018 Share Posted November 18, 2018 Hi Everyone, i have a script that is supposed to unequip items whenever certain other items are equippedfor that i use this script delivered via an ability added to the player. Scriptname DovahRingSlotMagicEffectScript extends activemagiceffect Formlist[] Property FingerListArray Auto Form[] slotObjs Actor ActorRef Event OnEffectStart(Actor akTarget, Actor akCaster) slotObjs = new Form[9] ActorRef = akTarget EndEvent Event OnObjectEquipped (Form akBase, ObjectReference akRef) float startTime = Utility.GetCurrentRealTime() int i = 9 while i i -= 1 if FingerListArray[i].HasForm(akBase) if slotObjs[i] ActorRef.UnEquipItem(slotObjs[i]) endif slotObjs[i] = akBase i = 0 endif endwhile float endtime = Utility.GetCurrentRealTime() Debug.MessageBox((endtime-startTime)as string) EndEvent The whole thing works but with one major drawback: the old items do not get unequipped until i exit the inventory.Does somebody know a way to force the menu to update while still in inventory? Link to comment Share on other sites More sharing options...
cdcooley Posted November 19, 2018 Share Posted November 19, 2018 You need to make a change to the items in inventory to force an update. One quick and easy way is to first give the player a gold coin then take it away. Just make sure you use the silent option so there's no notification. ActorRef.AddItem(Gold001, 1, true) ActorRef.RemoveItem(Gold001, 1, true) Link to comment Share on other sites More sharing options...
NexusComa Posted November 19, 2018 Share Posted November 19, 2018 nice Link to comment Share on other sites More sharing options...
testiger2 Posted November 19, 2018 Author Share Posted November 19, 2018 That solution seems to work, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts