Jump to content

custom spell immediately completes?


Recommended Posts

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

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 by Rizalgar
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...