It's important to get out of the habit of calling a Wait() command inside a function which is going to loop, as eventually the frame drop is noticeable. Khris' code is the best and most concise, but here is a layman's version (i.e. the version I would probabely make

) which tries to again not call Wait():
[code]
int CurrentFrame;
function room_AfterFadeIn(){
CurrentFrame = 0;
SetBackgroundFrame(0);
SetTimer(1, 200);
}
function room_RepExec(){
if (IsTimerExpired(1)) {
int MyValue = 5;
CurrentFrame ++;
if (CurrentFrame == 4){ //As there frame numbers go up to 3, when it hits 4 we reset it to 0.
CurrentFrame = 0;
MyValue = 400; //Between Frame 0 and 1 you want a 400 frame interval, not 5
}
SetBackgroundFrame(CurrentFrame);
SetTimer(1, MyValue);
}
}
[/code]
This could will not block any frames!
So umm.....yeah...this might be easier than the other code to understand (i had trouble!), but certainly less efficient!