Hello
Im trying to make my character change room after entering for the first time, seen a text displayed and wait for, lets say 4 seconds. I do it like this
// room script file
function room_FirstLoad()
{
Overlay.CreateTextual(20,133,0, Game.SpeechFont, 15,"El 28 de julio de 1914,despues de siglos de tensiones, estalla una gran guerra en Europa.");
SetTimer(1,160);
if (IsTimerExpired(1)) {
player.ChangeRoom(2);
}
}
It builts, but just never changes to room 2.
I cant see what I'm doing wrong, could someone help please?
It needs to be set in repeatedly execute. Currently, you're setting the timer to 160 loops, but then checking whether it's expired immediately after.
thanks
and how can I set the timer check in a repeatedly execute mode?
In the room editor, set a 'Repeatedly execute' event (this should add a function room_RepExec() bit to your room script, where you can add the IsTimerExpired)
ok, now I get it
thank you so much