Created Save Point brings me back before the save

Kinda weird. I created a save point through Common Events, but for some reasons, the save brings the player back moments before it actually occured.

For exemple, on this screenshot, I had saved after defeating the NPC you see in front of the prison (I have a switch, and command to make him disappear after the fight), and yet he's still there.

1704736599661.png


Also, as you can see on the same screenshot, the save command appears once more. Now, the other problem is that even though this Common Event brings the character back BEFORE I defeated the NPC, the stats remains the way it was after the fight. So basically my character was level 4 before starting the fight, then leveled up to 5. However, here, he's still level 5.

Anyone knows what causes this?


EDIT: I forgot to post the screenshots of the Common Event and the save point event.

Common Event :
1704736995148.png


Save Point Event:
1704737017845.png
The problem most likely lies with the NPC in front of the prison. Make sure your switch to make him disappear is actually working.
Where's the screenshot of the "NPC" event?

It sounds like you're not actually using a second page on it, but instead just calling Erase Event which causes it to reappear the next time the map is loaded.
In your pic the save command doesn't appear again, but the "will you be continuing your adventures?" question, which comes after the save in your event. You said that you even have the exp from the fight. So your only problem is probably with the NPC event (which you didn't show in your screenshots).
As requested, here is the screenshots of the NPC's event. I didn't post it at first, because I didn't think the problem was coming from him.

1704741708397.png
1704741720169.png
Did you read my post #3?

Erase Event only removes an event until the map is loaded again - what you're seeing is how the event command works.

If you want the event to stay away more permanently, you need to make a second, blank page and toggle a self switch to go to it. (or give it the condition of Switch #26)
Greetings,

There is no issue with the save function itself in this situation.

As Joral said, it's because you are using "Erase Event" in the event commands. That event command merely temporarily "erases" an event until the next time the map is loaded.

In other words, what is happening is that you are loading your save file and thus the map, and so the event is repopulated. This is why you are still level 5. The load worked just fine; it is your event respawning that is causing the confusion.

As I am writing this, ATT_Turan has already explained everything, so I'll just stop here and note that you can just follow his advice to solve your issue 😛.

Good luck with your development!

-Niniann
Did you read my post #3?

Erase Event only removes an event until the map is loaded again - what you're seeing is how the event command works.

If you want the event to stay away more permanently, you need to make a second, blank page and toggle a self switch to go to it. (or give it the condition of Switch #26)
Yes I read it. Sorry haha. I made the modifications after I posted the event screenshot.

Now, can someone please tell me how to remove the text after saving so it doesn't come back when I reload the game?
Now, can someone please tell me how to remove the text after saving so it doesn't come back when I reload the game?
The simple answer would be: don't have it.

That kind of question "Do you want to keep playing? Yes/No" is an artifact from really old games on computers and consoles that worked much differently than modern hardware does.

If a person doesn't want to keep playing, they don't need a prompt from you to give them permission - they can just close the game. For many players these days, that kind of message is just an annoying thing to click through.

If you really want to have it there for some reason, you'd have to get fancier and find a plugin that toggles a switch or sets a variable when a player loads their game. Then you put the text inside a conditional branch looking at that switch - it would be false if the player is playing, but true if they just loaded the game.

Otherwise, the game as far as event commands has no idea whether the player has loaded a game or is closing out from the save screen.

I know @caethyril made one for MZ. I'm not sure if she or someone else has an MV-equivalent but you could Google it.
You can track load/save for a save point by storing a value on a game object that is initialised on new/load game, but not included in save data. A good example is $gameTemp.

E.g. you could use a script call like this, before saving:
JavaScript:
$gameTemp.showPostSaveMessage = true;
Then put the stuff after it in a Conditional Branch -> Script:
JavaScript:
$gameTemp.showPostSaveMessage
I.e. "is that value truthy?" That should be true if you've just saved, but false if you've just loaded the save.
This is all you need to solve your file saving / loading problems.

JavaScript:
//=============================================================================
// KLoadGameMod.js
//=============================================================================

/*:
 * @plugindesc It prevents the game map from loading the save point event.
 * @author Kyonides Arkanthes
 */

Scene_Load.prototype.onLoadSuccess = function() {
  SoundManager.playLoad();
  this.fadeOutAll();
  this.reloadMapIfUpdated();
  SceneManager.goto(Scene_Map);
  $gameMap._interpreter.clear();
  this._loadSuccess = true;
}

Add it as a new plugin on the plugin manager window and that's all!

Original thread: https://forums.rpgmakerweb.com/threads/created-save-point-brings-me-back-before-the-save.164619/