Rooms

This section deals with the functions related to rooms.

Rooms in GameMaker: Studio are where everything happens in your game and you must have at least one room in any game for it to run, but in general you will need many more. This section has all the GML functions related to rooms and getting information about them or even setting certain properties within them. It should be noted that those functions related to changing room properties should never be run from within the room that you wish to change, but rather be run from an instance in another room first.

Room Information

The following functions and global variables are used for getting basic information about a room:

  1. room_exists
  2. room_first
  3. room_last
  4. room_next
  5. room_previous
  6. room
  7. room_speed
  8. room_height
  9. room_width
  10. room_persistent
  11. room_caption
  12. room_get_name

Moving Between Rooms

The following functions are used for moving between rooms:

  1. room_goto
  2. room_goto_next
  3. room_goto_previous
  4. room_restart

Creating and Changing Rooms

The following functions are used for creating rooms and changing room properties:

NOTE: These functions cannot be used with the current room otherwise errors and unpredictable behaviours can occur.

  1. room_add
  2. room_duplicate
  3. room_assign
  4. room_instance_add
  5. room_instance_clear
  6. room_tile_add
  7. room_tile_add_ext
  8. room_tile_clear
  9. room_set_background
  10. room_set_background_colour
  11. room_set_height
  12. room_set_width
  13. room_set_persistent
  14. room_set_view_enabled


Back: Game Assets
© Copyright YoYo Games Ltd. 2018 All Rights Reserved