Help~ I am frustrated as I have used below js to save&load the game, but the game doesn't play the bgm automatically
To save:
Then closed the game, and re-open with below code to load the save
To load:
Does $gameSystem.onBeforeSave()/$gameSystem.onAfterLoad() pair works if I closed the game? If yes, then what is the issue?
To save:
$gameSystem.onBeforeSave(); [U]//confirmed the current bgm has been saved to _bgmOnSave[/U]
$gameSystem.setSavefileId(1);
if (DataManager.saveGame(1)) StorageManager.cleanBackup(1);
Then closed the game, and re-open with below code to load the save
To load:
if (DataManager.loadGame(1)) {
SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
$gamePlayer.requestMapReload();
}
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad(); [U]//this function trying to replay the _bgmOnSave, but found the _bgmOnSave is null[/U]
}
Does $gameSystem.onBeforeSave()/$gameSystem.onAfterLoad() pair works if I closed the game? If yes, then what is the issue?