MV Errors and black screens when I continue from the game over screen.

Note: These issues only arise when I save the game. When I don't save the game, I can load a save fine from the game-over screen.

Here are the two issues:

1) This error. This only happens when I use a player touch event to create an autosave and use a switch to change the event so you can't trigger an autosave again.

Screenshot (525).png


2) A black screen. After a save from the menu or any sort of autosave event that doesn't involve a switch, I get a black screen upon continuing from a game over. The only thing that fixes the black screen and loads into the save is when I open and close the menu.

Things to note:

  • I use HIME_GameOverEvents to use events to set up a game over event.

  • This is my load script:
if (DataManager.loadGame(DataManager.latestSavefileId())) {
$gameSystem.onAfterLoad(); SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y, $gamePlayer.direction(), 0);
$gamePlayer.requestMapReload();
}
$gameSwitches.setValue(x, rememberSwitch); //1. modification
$gameMap.event(y)._erased = false; $gameMap.event().refresh(); //2. modification
SceneManager.goto(Scene_Map);
}
  • I was having issues with retaining music when reloading into a save so I created an autorun event on a certain map that would play music and erase the event - supposedly this script allows me to "unerase" the event to ensure the autorun event gets triggered - therefore the music can play when I load back into the script (i couldn't have the music as a map property because it was triggered by a player touch event on the map)
I wasn't having this issue until I changed the load script to this, so this could be at play. (Here is the thread about this issue) https://forums.rpgmakerweb.com/inde...bgs-bgm-after-loading-in.150961/#post-1298315

This is the autosave script I use (but you can also save from the menu which results in the same black screen):

$gameSystem.onBeforeSave();
DataManager.saveGame(1);
StorageManager.cleanBackup(1);

I can share my plugin list if needed but I have a lot of them and none of them involve saving or game-overs other than the HIME one I mentioned.

*I can always load into a save from the title screen just fine*

Any help appreciated! Thanks 🙂
Moved to: Javascript / Plugin Support

You might need to wait for the reload to happen before you tell it to do anything with events.
Moved to: Javascript / Plugin Support

You might need to wait for the reload to happen before you tell it to do anything with events.
Any idea on how to do this? All I'm looking for is to be able to play music upon reloading a save and it's gotten increasingly confusing.

Original thread: https://forums.rpgmakerweb.com/threads/errors-and-black-screens-when-i-continue-from-the-game-over-screen.151002/