Difference between revisions of "RegisterForSingleUpdateGameTime - Form"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>IsharaMeradin
m (→‎Notes: Added a note about not being able to register for game time updates until player recieves full controls)
Line 26: Line 26:
*Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
*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).
*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).
*Using this function could cause your game to freeze under any of the following conditions:
*Depending heavily on how you use it, 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 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.
*** Registering for a single update at an incredibly short interval does ''not'' appear to freeze the game, so long as it is not reregistered with a short interval within the update event.
** afInterval is expressed as X / Y where X and Y are both integers (no decimal points) and evaluate to less than 1.


== See Also ==
==See Also==
*[[ActiveMagicEffect Script]]
*[[ActiveMagicEffect Script]]
*[[Alias Script]]
*[[Alias Script]]

Revision as of 21:20, 17 March 2023

Member of: ActiveMagicEffect Script, Alias Script, and Form Script

Registers this active magic effect/alias/form for a single update game time event. Of course, this means you don't need to call UnregisterForUpdateGameTime(). 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.

Syntax

Function RegisterForSingleUpdateGameTime(float afInterval) native

Parameters

  • afInterval: In how much time (in game hours) the OnUpdateGameTime() should be triggered

Return Value

None

Examples

; Just tell us when 5 days have passed in game
RegisterForSingleUpdateGameTime(120.0) ; 24 * 5

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).
  • Depending heavily on how you use it, 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)
      • Registering for a single update at an incredibly short interval does not appear to freeze the game, so long as it is not reregistered with a short interval within the update event.
    • afInterval is expressed as X / Y where X and Y are both integers (no decimal points) and evaluate to less than 1.

See Also