Force crash and continue where you left off

How can I make a scene that the character breaks the fourth wall, closes the game, and when you open again, the game continues where you left off? like Doki Doki, Undertale, im scared, etc
You can close the game using a script call:
Code:
SceneManager.exit();

Before you do that, you can automatically save the game. Make sure you set a switch so that you don't create an infinite loop of loading the game and then closing it.
You can close the game using a script call:
Code:
SceneManager.exit();

Before you do that, you can automatically save the game. Make sure you set a switch so that you don't create an infinite loop of loading the game and then closing it.

Ok Thanks that's works. But how do I do the autoload without the title screen or pressing load game? or can not do it? I want to force it to load when the X switch is active, or something like that, without the player needing to click continue
So you now have 2 distinct issues left to solve:

1) You need to have data that persists across saves.
The normal switches and variables are saved into Save1, Save2, etc. and by default aren't accessible until the player loads that save file. Look for plugins that create persistent data, there was one I remember by Hime but their site might be down

2) You need to skip the title scene based on a certain condition or not. There should be plenty of skip title scene plugins, and it just needs to be modified to skip based on a condition (which depends on how you do #1)

Original thread: https://forums.rpgmakerweb.com/threads/force-crash-and-continue-where-you-left-off.104334/