Jump to content

While Loops vs SingleUpdate


leron9999

Recommended Posts

This is more a matter of script threading.

 

If your intent is to iterate through something without pause, While loops are a better choice.

 

If you find yourself using a While loop with a wait statement in it, then you may want to consider RegisterForSingleUpdate. This also frees up the scripting thread of execution.

 

There are some good remarks on script threading on the CK wiki http://www.creationkit.com/Threading_Notes_(Papyrus) It took me a few read-throughs and tests to understand it entirely because Papyrus is kind of strange, but it is well worth the read and I think it will speak to the heart of your inquiry.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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