Description
Wiki Description
Registers this active magic effect/alias/form for periodic Form.OnUpdate(). The interval is only counted when the game is not in menu mode. For example, you register for update every 5 seconds. 2 seconds go by and the player opens the menu for 10 seconds. Once the player puts the menu away, 3 more seconds will go by before your next update comes in. 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 OnUpdate events, every X seconds, 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.
- You should call Form.UnregisterForUpdate() before calling this function a second time or before calling Form.RegisterForSingleUpdate(...), or strange behavior may result. Testing suggests that calling
RegisterForSingleUpdateafterRegisterForUpdatewill replace the periodic update's timer interval with the one provided in the call toRegisterForSingleUpdateand will not start a single-update timer. It also suggests that subsequent calls toRegisterForUpdatewithout an interveningUnregisterForUpdatedo not behave as expected.
Parameters
floatafInterval
CK Wiki Description
Examples
; Register to receive update events every 10 real-time seconds
RegisterForUpdate(10.0)Auto-Generated Example
float myFloat__afInterval
myForm__toCallFunctionOn.RegisterForUpdate(myFloat__afInterval)