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
496
Reaction score
289
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
294
Reaction score
408
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,719
Reaction score
1,603
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 Posts

Latest Profile Posts

Surprising nobody, it turns out "next Friday" for the next Jump into Javascript has become "possibly Sunday if you're lucky" XD
Folks, if anyone sends you a message inviting you to add their API to your game, please report them. We don't want people spamming our members asking them to add stuff to their games for their own (or others') benefit. We've updated the forum rules to confirm this.
I'm listening to iiluminaughtii talking about the secrets behind shady businesses and scams. Meanwhile I'm writing a fanfic about Sephiroth from FF7, one specifically for my stepmom. I'll get to give it to her, too, because my boss said I could take the holidays off! Dec. 22-27 I will be in Orlando, and maybe Fort Myers too, visiting my dad and stepmom!
Of course, I bought a handful of games on the Steam Black Friday sale. Will I try them? Will I complete any? Who knows...
I don't really have any neat updates today about how I screwed up programming... But if you want to observe the intensenes of me programming, then you can check out my stream :)

Forum statistics

Threads
117,013
Messages
1,103,814
Members
152,911
Latest member
WakeNBake
Top