This is used to go to a given room.



Argument Description
numb The index of the room to go to.

Returns: N/A


This function will end the current room and go to the room specified by the input index. The room must exist or else an error will be given, and if you use the same room as the current room it will have the same effect as room_restart. 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.


switch (global.rm)
   case 0: room_goto(rm_level1); break;
   case 1: room_goto(rm_level2); break;
   case 2: room_goto(rm_level3); break;

The above code will check a global variable and change room based on the value that it holds.

Back: Rooms
Next: room_goto_next
© Copyright YoYo Games Ltd. 2018 All Rights Reserved