[SOLVED] show random rooms in a loop with a certain time per room - slider

Started by arj0n, Fri 19/03/2010 09:27:15

Previous topic - Next topic

arj0n

It does send the player to one of those rooms but it doesn't randomly loop anymore.
It just shows about 3 rooms and then stops... which I do not understand.

When I don't change the game speed [and so the random speed] by using the slider, the randomising loops like it should...

Edit:
Or, when there are only 10 rooms and the player would be send to not existing room eleven, it might break the loop?
But then, I guess, AGS would give an error...
Anyway, I'll have to check that one...

Gilbert

Maybe this is what breaks your game?

if (event == eEventEnterRoomBeforeFadein) {
    if ((data >= 1) && (data <= 6)) { // only set the timer for the rooms that are going to use it
      SetTimer(1, GetGameSpeed() * sldSpeed.Value);
    }
    else SetTimer(1, 0); // disable the timer for other rooms
}

Unless you have already changed it appropriately to match the possible range of rooms to teleport to.

arj0n

Gilbet: that was the problem, thanx!
And thanx guys for your help  ;)

SMF spam blocked by CleanTalk