Background for Skyrim SE
Member of the Form script
voidfunctionRegisterForUpdateGameTime(floatafInterval)Native

Description

Wiki Description

Registers this active magic effect/alias/form for periodic Form.OnUpdateGameTime() in game time. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.

Documentation Comment

Register for OnUpdateGameTime events, every X hours of game time, where X is the interval. All scripts attached to this form will get the update events


Caveats

CK Wiki - Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
  • Registering for game time updates is only possible after the player has received full player controls. For the default game the earliest a game time update can be registered is when the player gets their hands freed just inside Helgen Keep (MQ101 stage 240).
  • See the notes for Form.OnUpdateGameTime() for details on how often the event will be sent as sleeping, fast traveling, and serving jail time will affect it - as well as any additional notes.
  • If you find yourself doing this:
Event OnUpdateGameTime()
    UnregisterForUpdateGameTime()
    ; Do some stuff
endEvent

Then you should use Form.RegisterForSingleUpdateGameTime(...) instead

  • Using this function could cause your game to freeze under any of the following conditions:

    • afInterval is less than some number between 0.0244 and 0.0238. (1.0 / 41.0 and 1.0 / 42.0)
    • afInterval is expressed as X / Y where X and Y are both integers (no decimal points) and evaluate to less than 1.

Parameters

  1. floatafInterval

    CK Wiki Description

    How often, in game hours, the Form.OnUpdateGameTime() should be sent


Examples

No human-generated examples found for this function.

Auto-Generated Example

float myFloat__afInterval

myForm__toCallFunctionOn.RegisterForUpdateGameTime(myFloat__afInterval)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.