Hi everyone, I added this code to the plugin to run a common event at the start of each battle:
I am trying to add another piece of code to replicate the effect at the END of each battle, but without success.
I changed "Game_System.prototype.onBattleStart;" to "Game_System.prototype.onBattleEnd;" but this method doesn't exist! My Javascript knowledge is pretty poor, it's just amazing that I managed to add the trigger for the start of the battles ...
That's why I ask someone more experienced for help.
Link to Yanfly's plugin: Utility Common Events
JavaScript:
Yanfly.UCE.Game_System_onBattleStart = Game_System.prototype.onBattleStart;
Game_System.prototype.onBattleStart = function() {
Yanfly.UCE.Game_System_onBattleStart.call(this);
if (Yanfly.Param.UtilCommonEvents['battleStart'] > 0) {
$gameTemp.reserveCommonEvent(Yanfly.Param.UtilCommonEvents['battleStart']);
}
};
I am trying to add another piece of code to replicate the effect at the END of each battle, but without success.
I changed "Game_System.prototype.onBattleStart;" to "Game_System.prototype.onBattleEnd;" but this method doesn't exist! My Javascript knowledge is pretty poor, it's just amazing that I managed to add the trigger for the start of the battles ...
That's why I ask someone more experienced for help.
Link to Yanfly's plugin: Utility Common Events