eventOnTimerGameTime(intaiTimerID)
Description
Wiki Description
Event called once a game-time timer started on a script expires. This event will not be sent if the game is in menu mode.
Documentation Comment
Timer event, sent when a game-time timer on this script expires. The ID of the expired
timer is passed in as the parameter. This event is sent only once for each timer that
expires.
Caveats
CK Wiki - Notes
- Aliases and quests will automatically cancel all timers when the quest stops. Active magic effects will automatically cancel all timers when they are removed.
- This event is not relayed to any other script on the same form, or aliases or magic effects on that form.
- OnTimerGameTime may come in much later then you expect if the player is sleeping, waiting, fast traveling, or serving jail time. The event will be sent after the sleep/wait/travel/serve period is over, so you should be prepared to handle a much longer game-time tick then you might expect.
Parameters
intaiTimerID
CK Wiki Description
The ID number of the timer which just expired.
Examples
int myCoolTimerID = 10 ; Give our timer an ID we can remember
Function SomeFunction()
StartTimerGameTime(0.5, myCoolTimerID) ; Create the timer with a 30 minute game-time duration
EndFunction
Event OnTimerGameTime(int aiTimerID)
If aiTimerID == myCoolTimerID ; The 30 minute timer we started just expired
Debug.Trace("Timer ended! Do some cool stuff now...")
; If we wanted to have the timer start over, we could now do StartTimerGameTime again...
EndIf
EndEventAuto-Generated Example
Scriptname MyCoolScript extends ScriptObject
event OnTimerGameTime(int aiTimerID)
Debug.trace("Event received - OnTimerGameTime: aiTimerID = " + aiTimerID)
endEvent