maxarturo Posted March 2, 2020 Author Share Posted March 2, 2020 (edited) Hey, I just tried using the reference alias method I suggested originally, and it works like a charm. I did the sequence that you described in the original post, with this script attached: Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) Debug.MessageBox(akBaseObject.GetName() + " Equipped") EndEvent When equiping the sword again, after the greatsword, both sword and shield were equipped, and both got message boxes. Using a reference alias seems like the best option. My first attempt yesterday was the 'Dummy Quest' and the 'Master Controller' logics and the first event i test was 'OnObjectEquipped'.It might have actually been able to catch the 'Automatic Equip' but i didn't notice it because my attention was immediately redirected to a more serious issue. The 'OnObjectEquipped' + 'OnObjectUnequipped' needs to work along side with 'Wait' in order to ensure that they will work correctly, now if you are in 'Favorite' menu and you equip/unequip multiple items multiple times all those 'Wait' will stuck up and they will all fire when you exit the favorite menu, and since the equipment's abilities they all have different scripted function the majority of them will all fire when all those 'Wait' finish, and if you try to use the ability of the equipped equipment immediately after exiting the 'Favorite' menu without waiting for all those stuck up in memory functions to finish, it will CTD 80% of the times !!, and this a big NO NO... This is completely reasonable to happen since the equipment's scripts use/call different function, so i immediately moved from those logics, the workaround must fit my gears set up and not fit the gear to the workaround. I'll finish with the creation of the equipments since this is procedural and does not need any brain power, i'll set them up all to the logic that works right now, and i'll give it a try once more when i'm in a condition to multi task once again, i'm too tired... Thanks for your interest. Edited March 2, 2020 by maxarturo Link to comment Share on other sites More sharing options...
maxarturo Posted March 2, 2020 Author Share Posted March 2, 2020 When equiping the sword again, after the greatsword, both sword and shield were equipped, and both got message boxes. Using a reference alias seems like the best option. Have you tested if the OnUnEquipped() event is firing under the same conditions? When you equip the two handed weapon does the OnUnEquipped() event fire? When you equip the two handed sword and then look in the menu, are the little arrows still pointing at the shield and sword? I suspect if you tested this with two one handed swords the event would fire when equipped from the favorites menu. This definitely needs testing, SurfsideNaturals has just pointed to some potential very serious issues !. Link to comment Share on other sites More sharing options...
dylbill Posted March 2, 2020 Share Posted March 2, 2020 No problem. Since you are using SKSE, instead of using the Utility.Wait function, use Utility.WaitMenuMode. This way, your scripts can be set while you're in the menu, preventing them all from running at once when you exit the menu. Link to comment Share on other sites More sharing options...
SurfsideNaturals Posted March 2, 2020 Share Posted March 2, 2020 This definitely needs testing, SurfsideNaturals has just pointed to some potential very serious issues !. Yes, If the OnUnEquipped() event is not firing either, under your conditions, then you can just put a condition on the perk so it will only work when the shield is equipped. Put Debug.Notifications on both events and test them. I would also like to see your script on the items. Keep in mind ,if you equip an item right out of a container the OnEquipped() event will not fire consistently. Link to comment Share on other sites More sharing options...
Recommended Posts