- Joined
- Mar 1, 2019
- Messages
- 3
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
I want to check to see if a specific skill is used in battle and after the first part of the attack animation plays (for a magic spell when the magic circle forms under the actor), transfer the game to a custom scene in which I plan to have a mini game of some sort and when that mini game is completed, return to the map and execute a cut scene. I have been looking through the code for a few hours and I am a unsure what function to overwrite to catch the game right after the actor does the first part of the animation but before the next part executes. I have been looking through BattleManager specifically at these functions:
and it just looks like a lot of math calculations for determining if an attack is countered or not. I was hoping the invokeAction functions would call the animation functions in Spriteset_Battle but I dont see anything in the battle manager pertaining to animation (Though I'm not seeing a lot of update functions in the Spriteset_Battle class either). So my question is where is the code that executes the first part of the magic animation so after that completes, I can redirect the game to my custom scene before any more actors or enemies do anything else?
Code:
BattleManager.startAction = function() {
var subject = this._subject;
var action = subject.currentAction();
var targets = action.makeTargets();
this._phase = 'action';
this._action = action;
this._targets = targets;
subject.useItem(action.item());
this._action.applyGlobal();
this.refreshStatus();
this._logWindow.startAction(subject, action, targets);
};
BattleManager.updateAction = function() {
var target = this._targets.shift();
if (target) {
this.invokeAction(this._subject, target);
} else {
this.endAction();
}
};
BattleManager.endAction = function() {
this._logWindow.endAction(this._subject);
this._phase = 'turn';
};
BattleManager.invokeAction = function(subject, target) {
this._logWindow.push('pushBaseLine');
if (Math.random() < this._action.itemCnt(target)) {
this.invokeCounterAttack(subject, target);
} else if (Math.random() < this._action.itemMrf(target)) {
this.invokeMagicReflection(subject, target);
} else {
this.invokeNormalAction(subject, target);
}
subject.setLastTarget(target);
this._logWindow.push('popBaseLine');
this.refreshStatus();
};
BattleManager.invokeNormalAction = function(subject, target) {
var realTarget = this.applySubstitute(target);
this._action.apply(realTarget);
this._logWindow.displayActionResults(subject, realTarget);
};

