Hi all!
I'm wondering if there is a way to hold the game interpreter until a plugin execution is finished.
For example in the sequence:
- Show Message
- Call plugin command
- Show message
The last Show Message shouldn't be called until the plugin command is fully executed
I tried to add a new wait mode to the Game Interpreter by modding this:
by adding a new case "plugin" that would check on a plugin boolean.
On the plugin command it would be called the setWaitMode to "plugin" but it doesn't work
I'm wondering if there is a way to hold the game interpreter until a plugin execution is finished.
For example in the sequence:
- Show Message
- Call plugin command
- Show message
The last Show Message shouldn't be called until the plugin command is fully executed
I tried to add a new wait mode to the Game Interpreter by modding this:
JavaScript:
Game_Interpreter.prototype.updateWaitMode = function() {
let character = null;
let waiting = false;
switch (this._waitMode) {
case "message":
waiting = $gameMessage.isBusy();
break;
case "transfer":
waiting = $gamePlayer.isTransferring();
break;
case "scroll":
waiting = $gameMap.isScrolling();
break;
case "route":
character = this.character(this._characterId);
waiting = character && character.isMoveRouteForcing();
break;
case "animation":
character = this.character(this._characterId);
waiting = character && character.isAnimationPlaying();
break;
case "balloon":
character = this.character(this._characterId);
waiting = character && character.isBalloonPlaying();
break;
case "gather":
waiting = $gamePlayer.areFollowersGathering();
break;
case "action":
waiting = BattleManager.isActionForced();
break;
case "video":
waiting = Video.isPlaying();
break;
case "image":
waiting = !ImageManager.isReady();
break;
}
if (!waiting) {
this._waitMode = "";
}
return waiting;
};
by adding a new case "plugin" that would check on a plugin boolean.
On the plugin command it would be called the setWaitMode to "plugin" but it doesn't work