Jump to content

Recommended Posts

Posted

Is it true that while loops are more taxing on memory usage as compared to single update? Which is generally safer to use, taking into account script maintainability and save game preservation (for updating and uninstalling)?

Posted

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.

  • Recently Browsing   0 members

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