room


描述

This variable holds the room index for the current room that your game is running. This is not a read only variable, however changing this will not change the index value for the current room, but rather change the room to match the index that you have set the variable to. Care should be taken when doing this as if the index you change the variable to is not valid the game will throw an error and close. In general it is much better practice to use room_goto to change rooms.


语法:

room;


返回:

Real (unique index value)


例如:

if room_next(room) != -1
   {
   room_goto(room_next);
   }

The above code will check to see if the next room exists and if so, it will go to it.


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