haganinc Posted March 11, 2012 Share Posted March 11, 2012 I remember in Oblivion when creating a scripted spell there was an event called ScriptEffectUpdate that was called every frame. Is it possible to do something similar with Skyrim? Obviously I can register for an update but as far as I can tell the smallest time frame you can pass in is a single second. What if I my script needs to update more often than that, for example moving an object or doing calculations? Link to comment Share on other sites More sharing options...
Korodic Posted March 11, 2012 Share Posted March 11, 2012 http://www.creationkit.com/OnUpdate_-_Form as close as I think you can get. Link to comment Share on other sites More sharing options...
tunaisafish Posted March 11, 2012 Share Posted March 11, 2012 Papyrus adds a lot more efficient methods of doing things that used to require gamemode.For movement, take a look at the commands with *Translate* in their name. Link to comment Share on other sites More sharing options...
jimhsu Posted March 11, 2012 Share Posted March 11, 2012 (edited) RegisterForUpdate intervals of < 1 second should work fine. Just try to use them sparingly due to performance concerns. Edited March 11, 2012 by jimhsu Link to comment Share on other sites More sharing options...
haganinc Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks, the translate methods will help with some of my problems, and I'll see what happens if I use intervals of less than a second with OnUpdate for some of my other ideas. To be honest I assumed it couldn't go lower than a second but now that I look at it the variable is a float so maybe something like .1 would work. Link to comment Share on other sites More sharing options...
tunaisafish Posted March 11, 2012 Share Posted March 11, 2012 Avoid RegisterForUpdate() There are 2 problems with it.1/ With small update times, the events may come in faster before your last OnUpdate completes. Causing a spiral effect on loaded machines.2/ Even if the mod and script are completely removed, the events still continue. To avoid both these, you can do all you need with registerForSingleUpdate(), and calling it again at the end of your OnUpdate block if needed. Link to comment Share on other sites More sharing options...
Recommended Posts