room_goto_next


Description

With this function you can make your game go to the next one as listed in the resource tree at the time the game was compiled. If this room does not exist, an error will be thrown and the game will be forced to close. Note that the room will not change until the end of the event where the function was called, so any code after this has been called will still run if in the same event.


Syntax:

room_goto_next();


Returns:

N/A


Example:

if room_exists(room_next(room)) room_goto_next();

The above code will check to see if there is another room after the current one and if so it will go to that room.


Back: General Room Functions And Variables
Next: room_goto_previous
© Copyright YoYo Games Ltd. 2018 All Rights Reserved