Jump to content

Recommended Posts

Posted
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?
Posted (edited)
RegisterForUpdate intervals of < 1 second should work fine. Just try to use them sparingly due to performance concerns. Edited by jimhsu
Posted
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.
Posted

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.

  • Recently Browsing   0 members

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