Jump to content
Sign in to follow this  
DangerZone

Comment event Effect on skill run first?

Recommended Posts

I don't so much need a script as I need help figuring out where in the .js files to start.

I am trying to make it so that when I use a skill that has a common event as an effect, the common event runs first, and THEN the actual skill.

For instance, if I create a summoning skill called "Ifrit", and I set the effect to a common event to show pictures, it would do the damage and then show a picture.

Instead I would like to run the common event first, to show the picture first and then finish with an animation and damage.

Share this post


Link to post
Share on other sites

During action processing, event updating is not performed

 

  BattleManager.updateEvent = function() {
    switch (this._phase) {
    case 'start':
    case 'turn':
    case 'turnEnd':
        if (this.isActionForced()) {
            this.processForcedAction();
            return true;
        } else {
            return this.updateEventMain();
        }
    }
    return this.checkAbort();
  };

  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);
    
  };
You would need to figure out when to check for common events, and consequently, process those events before actually performing the skill.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×