So I'm trying to make a save point that asks if you want to save then when selecting yes, opens save menu then asks if the player would like to quit. Right now if you quit and load back in, it loads back into the question if you'd like to quit. i had this worked out once but lost the event and game when my pc crashed.
Save point that asks if player wants to quit
RPG Maker MZ SupportWhy would you need this when there's a default option to quit the game in the main menu?
I answered something similar over there: https://forums.rpgmakerweb.com/inde...-restarting-oneshot-style.140902/post-1218552
Basically, you need a temporary variable that doesn't get saved. Then, if the variable exists, you ask the player if they want to quit. If the variable doesn't exist, then they've just loaded the save and obviously don't want to quit again.
So just before you save, you need to call the following script:
This must happen before the player saves.
After the game is saved, you need a Conditional Branch that checks if the variable exists, using following script:
If the condition is met, ask the player if they want to quit.
Basically, you need a temporary variable that doesn't get saved. Then, if the variable exists, you ask the player if they want to quit. If the variable doesn't exist, then they've just loaded the save and obviously don't want to quit again.
So just before you save, you need to call the following script:
JavaScript:
$gameTemp.doShutdown = true;
After the game is saved, you need a Conditional Branch that checks if the variable exists, using following script:
JavaScript:
$gameTemp.doShutdown
I also question if you actually want this. When I'm playing a game, the number of times I save is very large compared to the number of times I stop playing.
If I'm playing an old game that asks me if I want to quit every time I save, I find it very annoying as a player. It's really simple to hit Escape and quit, or just press Alt+F4, I don't need extra keystrokes every save point.
If I'm playing an old game that asks me if I want to quit every time I save, I find it very annoying as a player. It's really simple to hit Escape and quit, or just press Alt+F4, I don't need extra keystrokes every save point.
Original thread: https://forums.rpgmakerweb.com/threads/save-point-that-asks-if-player-wants-to-quit.141464/