- Joined
- Jan 12, 2019
- Messages
- 972
- Reaction score
- 566
- First Language
- Poland
- Primarily Uses
- RMMV
It may be silly question, because for single event that initiaties battle I can call this script:
and there is no problem... But... Battles in my project are quite difficult and there are lot of events with battles (really lot), so putting this code in each event may be... frustrating. So I thought about common event and by using SumrndDude Common Event Battle Start plugin
run that Saving common event before battle starts, but it turns out this causes some issues, game freezes. So my question is do you know an efficient method to achieve following:
#1 Player touches event with BOSS fight
#2 Common event saves game
#3 There is some delay (hmm... maybe 45 frames)
#4 Battle starts.
But I've just realized something, when player loads that save file, points #3 and #4 will execute after game is loaded.
Let me rephrase question, how to save game before battle starts, but after load player will have choice whetter to start battle or not.
(I've checked BattleManager, but I didn't find specific method to place $gameTemp.reserveCommonEvent(id), I was searching something BattleManager.onBeforeStartBattle())... thank you in advance.
JavaScript:
var slot = 10;
if (!$gameParty.inBattle()){
if (DataManager.lastAccessedSavefileId() !== 0){
$gameSystem.onBeforeSave();
DataManager.saveGame(slot);
}
}
run that Saving common event before battle starts, but it turns out this causes some issues, game freezes. So my question is do you know an efficient method to achieve following:
#1 Player touches event with BOSS fight
#2 Common event saves game
#3 There is some delay (hmm... maybe 45 frames)
#4 Battle starts.
But I've just realized something, when player loads that save file, points #3 and #4 will execute after game is loaded.
Let me rephrase question, how to save game before battle starts, but after load player will have choice whetter to start battle or not.
(I've checked BattleManager, but I didn't find specific method to place $gameTemp.reserveCommonEvent(id), I was searching something BattleManager.onBeforeStartBattle())... thank you in advance.