I want to be able to change rooms when my music ends and be able to skip on a button press. Each of the following scripts work as expected but I want to combine them. Any ideas?
function room_AfterFadeIn()
{
while (!mouse.IsButtonDown(eMouseLeft) && !IsKeyPressed(13) && !IsKeyPressed(27) && !IsKeyPressed(32))
{
Wait(1);
}
player.ChangeRoom(3);
}
or
function room_AfterFadeIn()
{
Wait(400);
player.ChangeRoom(3);
}
Something like this should work:
function room_AfterFadeIn()
{
int tempcount = 0;
while (!mouse.IsButtonDown(eMouseLeft) && !IsKeyPressed(13) && !IsKeyPressed(27) && !IsKeyPressed(32) && tempcount<400)
{
Wait(1);
tempcount++;
}
player.ChangeRoom(3);
}
Thank you, works perfectly.