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.




Real (unique index value)


if room_next(room) != -1

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