- Joined
- Feb 1, 2020
- Messages
- 70
- Reaction score
- 9
- First Language
- English
- Primarily Uses
- RMMZ
Hey everyone!
While I was working in MV, I had two script snippets I could use to load/save game data via a picture based menu just fine:
Save:
Load:
The snippets were mainly taken from the MV/MZ Script Call List here.
Since then however... I'm porting my project to MZ- these scripts still work well, except audio doesn't resume upon loading in.
The audio however does successfully load if I run the load script twice, in separate executions. (It seems like the code can load the audio if the map is already loaded?)
Was there something about loading files that changed between versions that I should fix? I am now running Visustella's Save Core as well, but I don't think that should interfere with this.
Thanks in advance for the help!
While I was working in MV, I had two script snippets I could use to load/save game data via a picture based menu just fine:
Save:
JavaScript:
if(AudioManager._bgmBuffer){
savbgm=AudioManager._currentBgm.name
}else{
savbgm=false;
}$gameSystem.onBeforeSave();
if (DataManager.saveGame(6)) {
StorageManager.cleanBackup(6);
}
JavaScript:
if (DataManager.loadGame(6)) {
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
$gamePlayer.requestMapReload();
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad();
}
The snippets were mainly taken from the MV/MZ Script Call List here.
Since then however... I'm porting my project to MZ- these scripts still work well, except audio doesn't resume upon loading in.
The audio however does successfully load if I run the load script twice, in separate executions. (It seems like the code can load the audio if the map is already loaded?)
Was there something about loading files that changed between versions that I should fix? I am now running Visustella's Save Core as well, but I don't think that should interfere with this.
Thanks in advance for the help!