Talk:OnCellDetach - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Event Timing[edit source]

Testing has revealed that this event can lag behind a new call to OnCellAttach. What this means is if you're checking multiple cells with these two events, it's possible that the next run of OnCellAttach in the series will come before the running of this event. To put it simply..if you're expecting this: OnCellAttach -> OnCellDetach -> OnCellAttach..don't. It can be OnCellAttach -> OnCellAttach -> OnCellDetach. Normally this isn't an issue but it will be if you need to track the time when cells have been attached or detached and use those times in other calculations. I have been working with all the attachement based events for many months now as I had thought them to be very reliable, much to my disappointment. That being said, do use these as they are more reliable than say OnLoad, but for very complex operations where attachment order is important, these 2 events fall short. --TwilightSky (talk) 17:58, 26 September 2024 (EDT)