room_persistent


描述

This variable can be used to get and to set the persistent flag for the current room. If set to true the room is considered persistent, in which case each time you leave the room and come back again the state of the instances within that room will have been maintains. However if it is flagged as false, each time you return to the room it will be reset to its initial state. You should note that a persistent room uses considerably more memory than a normal room and it is not recommended to have too many of them in your game.


语法:

room_persistent;


返回:

Boolean(布尔值)


例如:

if lives < 1
   {
   room_persistent = false;
   room_goto(rm_start);
   }

The above code checks the variable "lives" and if it is less than 1, it will set the room persistence to false and then change rooms.


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