foamyesque Posted March 19, 2019 Share Posted March 19, 2019 0.16s is a fairly long duration. Can I see your full OnEffectFinish() code? Right now my immediate thought would be to create a wrapper function for Stop() on a quest, so that it can be relied on to run regardless of whether the magic effect that called into it still exists or not, and so that you can make the call from the ActiveMagicEffect non-latent and execute all your other stuff without having to wait on the 3D stuff. I'm not certain exactly where you'd go from there. Could stuff them into an alias and listen for an OnLoad() event, which doesn't involve polling but is limited by the number of aliases you create. Link to comment Share on other sites More sharing options...
ANaj Posted March 19, 2019 Share Posted March 19, 2019 didn't try it myself but maybe the RemoveAllitems will help? Function RemoveAllItems(ObjectReference akTransferTo = None, bool abKeepOwnership = false, bool abRemoveQuestItems = false) native My idea was to use some background containers to filter the questitems on death. don't know if it works though, never used the flag "abRemoveQuestItems" before. Link to comment Share on other sites More sharing options...
foamyesque Posted March 22, 2019 Share Posted March 22, 2019 I gave this a bit more thought and I think I have a solution: as the first effect closes out, use AddSpell to add an Ability to the Actor it is on. That Ability has a single MagicEffect, on which is a script that, OnEffectStart(), checks a. if the Actor still has the trigger effect and then, if it does not, b. if the object's 3D is loaded. If the effect is gone and the object's 3D is loaded, purge your effects and remove the Ability from the Actor; otherwise, do nothing. OnEffectStart() should fire every time the Actor loads in. This gives you a scalable, non-polling solution that doesn't make references persistent. Link to comment Share on other sites More sharing options...
xkkmEl Posted August 11, 2021 Share Posted August 11, 2021 I think you can test whether an item is quest related with SKSE using GetNumReferenceAliases, but you need an ObjectReference (so you need to move the item out of the inventory first). Link to comment Share on other sites More sharing options...
Recommended Posts