Hi guys :grin:
I initially couldn't get the timer to work and found a thread where another user had the same issue.
Here I discovered Crimson Wizard's Timer Module and imported the script. But my timer still isn't working.
Timer *chickenTimer;
function room_AfterFadeIn()
{
chickenTimer = Timer.StartRT(5.0);
if (Timer.IsExpired(chickenTimer)) {
cSmileyface.ChangeRoom(15);
}
}
I want to change room when the timer expires, but as far as I can tell there's nothing wrong with my code. Am I missing something?
You need to check for timer expiration in "repeatedly execute" event.
What happens in your code here is this: you create a timer, immediately check it for expiration once (which won't happen since it just started) and leave it.
Another mystery solved! Thank you, now I understand how it works.