room_add();
Returns: Real
This function will create a new, empty, room and add it to your
game, returning its index to be stored in a variable for all
further codes that deal with this room.
NOTE: New rooms are not part of usual room ordering, so
they do not have a "previous" or "next" room (meaning that the
functions room_next and
room_previous will not
work). To jump from the added room to another, you must use the
index of the room itself.
global.myroom = room_add();
room_set_width(global.myroom, 640);
room_set_height(global.myroom, 480);
room_set_persistent(global.myroom, false);
This will create a new room and store its index in the variable "global.myroom". It will then set its width to 640 pixels, its height to 480 pixels, and its persistence to false.