Difference between revisions of "RegisterForSingleUpdate - Form"
Jump to navigation
Jump to search
imported>Imp of the Perverse (→Notes) |
m Tag: Manual revert |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Papyrus]] | [[Category:Papyrus]] | ||
[[Category:Non-delayed Native Function]] | |||
'''Member of:''' [[ActiveMagicEffect Script]], [[Alias Script]], and [[Form Script]] | '''Member of:''' [[ActiveMagicEffect Script]], [[Alias Script]], and [[Form Script]] | ||
Line 18: | Line 19: | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; Register for a single update in | ; Register for a single update in 30.0 seconds - does not count menu-mode time. | ||
RegisterForSingleUpdate( | RegisterForSingleUpdate(30.0) | ||
</source> | </source> | ||
== Notes == | == Notes == | ||
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. | ||
*Subsequent calls to RegisterForSingleUpdate will override previous ones - i.e. calling it back to back will result in the second registered update occurring, but not the first. It will not interfere with updates started by RegisterForUpdate however. | |||
Subsequent calls to | |||
== See Also == | == See Also == | ||
Line 31: | Line 31: | ||
*[[Alias Script]] | *[[Alias Script]] | ||
*[[Form Script]] | *[[Form Script]] | ||
*[[RegisterForSingleUpdateGameTime - Form]] | |||
*[[RegisterForUpdate - Form]] | *[[RegisterForUpdate - Form]] | ||
*[[UnregisterForUpdate - Form]] | *[[UnregisterForUpdate - Form]] | ||
*[[OnUpdate - Form]] | *[[OnUpdate - Form]] |
Latest revision as of 12:00, 13 July 2023
Member of: ActiveMagicEffect Script, Alias Script, and Form Script
Registers this form/alias/magic effect for a single update event. Which also means you don't need to call UnregisterForUpdate() unless you want to cancel the update early. 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[edit | edit source]
Function RegisterForSingleUpdate(float afInterval) native
Parameters[edit | edit source]
- afInterval: In how much time (in seconds, ignoring menu-mode time) the OnUpdate() should be triggered
Return Value[edit | edit source]
None
Examples[edit | edit source]
; Register for a single update in 30.0 seconds - does not count menu-mode time.
RegisterForSingleUpdate(30.0)
Notes[edit | edit source]
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
- Subsequent calls to RegisterForSingleUpdate will override previous ones - i.e. calling it back to back will result in the second registered update occurring, but not the first. It will not interfere with updates started by RegisterForUpdate however.