NahiroN

Warper
Member
Joined
Dec 25, 2012
Messages
3
Reaction score
2
First Language
English
Primarily Uses
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.
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
498
Reaction score
292
First Language
English
Primarily Uses
RMMZ
Why would you need this when there's a default option to quit the game in the main menu?
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
299
Reaction score
423
First Language
French, German
Primarily Uses
RMMZ
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:
JavaScript:
$gameTemp.doShutdown = true;
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:
JavaScript:
$gameTemp.doShutdown
If the condition is met, ask the player if they want to quit.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,823
Reaction score
1,649
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Profile Posts

My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,684
Members
153,384
Latest member
mfilez
Top