room_get_name


描述

This function can be used to return the name of the specified 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().


语法:

room_get_name(index);


参数:

参数 描述
index The index of the room to check the name of.


返回:

String(字符串)


例如:

var roomname = room_get_name(room);
draw_text(32, 32, roomname);

The above code will get the name of the current room and draw it on the screen.


上一页: General Room Functions And Variables
下一页: room_goto
© Copyright YoYo Games Ltd. 2018 All Rights Reserved