Go to the Settings tab and click Creation Code to bring up the room's code editor. Now, make sure the last room is not persistent (it's the empty room you made). If it isn't, go to the next room but if it is the last room, go to the name entry room or whatever. In the Begin Step event of your persistent controller, check if your global variable is true if it is, check if the current room is the last one in your resource list. Then use room_goto_next() to go to the next room in the resource list. In a persistent controller object, when New Game is clicked you set your variable to true and then you loop through all the rooms that are persistent and call room_set_persistent(roomID,false) to tell each room to clear itself. Make a global variable to specify that you want to reset all the rooms. First create an empty room and put it at the very end of your resource list. Save and Load are in the pause menu so you could load at anypoint but you cant start again without exiting and starting the game from windows and that sucks. and make the "New Game" button just send you to the starting room. So more likely im going to have to make the main menu inaccessible from the pause menu so if you want to start a new game, you need to manually exit and restart the game. Nnow its looking like im either going to write a huge slow code Īnd i really dont think this is the best way of going about this I thought game_restart() wouldve solved this but it doesnt. my solution was to reset the stats and make the current room = starting room, this works except, if you've killed any enemies or collected anything, then theyre still dead or missing because every room is persistent. the current room is not the starting room, the stats are the same and all the killed enemies are still gone. My thinking was when you press "New Game" you need to reset the whole game, i looked this up and the code for this is rather straight forward game_restart(). It all works fine except when you create a new game from the main menu. ![]() its an RPG game so when i load the stats i had when saved and the room i was in when saved becomes the current room and stats. it works fine, except the whole game is persistent. So i have a main menu, and a few test levels, i also have a save and load feature.
0 Comments
Leave a Reply. |