W
Wild_West
Guest
I'm almost ready to make levels for my game now that my enemies, player stats, inventory, shopping and environmental objects are all finally done. But I need to reset the playable levels once the player reaches a warp point at the end of the stage so they can visit the area where they spend points to power up and continue through the game.
I read about room persistence in the manual and according to it, you can't set the persistence of a room you've already visited.
Then it says to switch off persistence "you should go to that room, and THEN switch persistent off" except before that it says :
"With this function you can change (or set) the persistence of any room in your game except the current one."
So I'm just confused as to what they mean, but all I need to do in my game is reset all the playable rooms to false every time I go back to map select.
Another object controls the next playable stages unlocking in the map select room.
My question is ,
How do I use room_set_persistent(); to change rooms I play through back to how they were initially after I change room to map select ONLY? (Or basically any room that's not a playable stage)
Because I tried using this code below to do it in a test project but my room1 kept resetting after I came back from room4 anyway.
This is in room start vent of my level controller object. Level Controller IS persistent.
if(room == starting_room)
{
room_set_persistent(room4,false);
room_set_persistent(room1,false);
}
I read about room persistence in the manual and according to it, you can't set the persistence of a room you've already visited.
Then it says to switch off persistence "you should go to that room, and THEN switch persistent off" except before that it says :
"With this function you can change (or set) the persistence of any room in your game except the current one."
So I'm just confused as to what they mean, but all I need to do in my game is reset all the playable rooms to false every time I go back to map select.
Another object controls the next playable stages unlocking in the map select room.
My question is ,
How do I use room_set_persistent(); to change rooms I play through back to how they were initially after I change room to map select ONLY? (Or basically any room that's not a playable stage)
Because I tried using this code below to do it in a test project but my room1 kept resetting after I came back from room4 anyway.
This is in room start vent of my level controller object. Level Controller IS persistent.
if(room == starting_room)
{
room_set_persistent(room4,false);
room_set_persistent(room1,false);
}