room_get_name

This function returns the name of the given room as a string.

Please note that this is only a string and cannot be used to reference the room directly - for that you would need the room index. You can, however, use this string to get the room index using the returned string along with the function asset_get_index().

 

Syntax:

room_get_name(index);

ArgumentTypeDescription
indexRoom AssetThe room to check the name of.

 

Returns:

String

 

Example:

var _roomname = room_get_name(room);

draw_text(32, 32, _roomname);

The above code gets the name of the current room and draws it on the screen.