leron9999 Posted September 5, 2014 Share Posted September 5, 2014 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)? Link to comment Share on other sites More sharing options...
jaxonz Posted September 5, 2014 Share Posted September 5, 2014 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 More sharing options...
leron9999 Posted September 5, 2014 Author Share Posted September 5, 2014 Ah, I see. Thanks! And thanks for the link as well. I'll be sure to read through that. Link to comment Share on other sites More sharing options...
Recommended Posts