JediStudley Posted April 23, 2019 Share Posted April 23, 2019 I'm creating a new spell that has 3 effects and has a problem immediately terminating. Each effect has a duration set for 20 seconds and the last magic effect has a papyrus fragment set so I can see the on-start and on-end generate a log message. the messages print one after the other with no delay. I'm not sure what I've missed and why the effect starts and finishes almost immediately even if the duration is set to 20 seconds... Any suggestions would be appreciated! Link to comment Share on other sites More sharing options...
Rizalgar Posted April 23, 2019 Share Posted April 23, 2019 (edited) Post the scripts and I'll see if I can help. If you want a scripted spells duration to last for 20 seconds sometimes doing it through the spellmaking duration doesn't work. If you want a start effect, multiple effects or periodic effects, use timers. In example Oneffectstart Effect 1 Utility.wait(1.0) Effect 2 Utility.wait(19.0) Final effect Edited April 23, 2019 by Rizalgar Link to comment Share on other sites More sharing options...
JediStudley Posted May 1, 2019 Author Share Posted May 1, 2019 Thanks for the offer. I've stripped it down to very simple test cases, similar to the example given by Rizalgar. I've concluded there is a bug in skyrim where the finish effect is always run right after the start finishes. I've also copied some of the more complicated DLC1 spells for testing with Debug.Notification added and found the same behavior. I'm going to revise my approach and use the onupdate() functionality to get the job done. Link to comment Share on other sites More sharing options...
Rizalgar Posted May 1, 2019 Share Posted May 1, 2019 Depending on what you're going for, you can use both registerforsingleupdate and registerforupdate in the same script. Not 100% sure how you could do it oneffectstart but with oninit you can run the initial update then in the onupdate block run the reoccuring onupdate for a new block. This is purely theoretical and not something I've actually tried. It seems plausible enough for it to work though. Link to comment Share on other sites More sharing options...
Recommended Posts