Is there an easy way to trigger a screensaver, being sent to another room, after a certain period of time? It probably has go to somewhere in the global rep exec script but I have no idea how to find out whether the player moved his or her mouse and hit any buttons the last five minutes or now.
I tried snooping about the forums with little luck. Cheers!
Edit: The code below with a few additions made the screensaver work perfectly! Thanks a lot.
Something like this (not polished)?
On top of global script:
int idletime=0, lastmx=0, lastmy=0;
In rep. exec. of the global script:
if (player.Room != 4) { //Say, room 4 is the "screensaver" room
if (mouse.x==lastmx&&mouse.y==lastmy) {
idletime++;
if (idletime>=12000) player.ChangeRoom(4); //5 minutes
} else idletime=0;
lastmx=mouse.x;
lastmy=mouse.y;
}
In on_mouse_click() function add the line:
idletime=0;