88man88 Posted September 22, 2018 Share Posted September 22, 2018 Help me someone. Give a simple example of how to use this for cyclic actions. For example, every 10 seconds. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted September 22, 2018 Share Posted September 22, 2018 https://www.creationkit.com/fallout4/index.php?title=OnTimer_-_ScriptObject has a good example for 5 seconds. Link to comment Share on other sites More sharing options...
scrivener07 Posted September 27, 2018 Share Posted September 27, 2018 The event is only sent once for every registration. Call start timer in the body of the OnTimer too. int MyTimerInterval = 10 const int MyTimerID = 999 const Event OnInit() StartTimer(MyTimerInterval, MyTimerID) EndEvent Event OnTimer(int aiTimerID) If (aiTimerID == MyTimerID) StartTimer(MyTimerInterval, MyTimerID) ; ask for another one, indefinitly EndIf EndEvent Most scripts like this should also consider a terminating condition but most objects you would attach to will automatically cancel the timer when appropriate. For example, a quest that is stopped will also cancel any timers on scripts which belong to it. Link to comment Share on other sites More sharing options...
Recommended Posts