I really could use some help with this piece of code I'm trying to do. I've been trying to get it solved for quite awhile now with no luck. I'm trying to make it so when the last actor is defeated, the game waits one second before moving to the Game Over screen. I know this is the piece of code I need to modify:
I've tried using the code below (at the suggestion of another user), and it didn't work (I even set the count to 600 for testing). I must be missing something about how to write the code for wait time, but I don't know what. Help is greatly appreciated.
JavaScript:
BattleManager.processDefeat = function() {
if (this._canLose) {
this.replayBgmAndBgs();
} else {
AudioManager.stopBgm();
}
this.endBattle(2);
};
I've tried using the code below (at the suggestion of another user), and it didn't work (I even set the count to 600 for testing). I must be missing something about how to write the code for wait time, but I don't know what. Help is greatly appreciated.
JavaScript:
BattleManager.processDefeat = function() {
if (this._canLose) {
this.replayBgmAndBgs();
} else {
AudioManager.stopBgm();
$gameTroop._interpreter.wait(600);
}
this.endBattle(2);
};