kotonoha* - Counter Animation (Battle)

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
654
Reaction score
1,101
First Language
English
Primarily Uses
N/A
CounterAnimation - 2016/05/18 ver1.1

Creator name: kotonoha*

Overview
Plays an animation when a counterattack was about to happen.
If you have an animation of reflect barrier for physical attack would fit.

Feature
- You can set Animation ID through parameter
- AnimationWait param for animation delay

Note: Animation ID is 0 by default, be sure to change it

Preview


Credit and Thanks: kotonoha*

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php

JavaScript:
// --------------------------------------------------------------------------
//
// CounterAnimation
//
// Copyright (c) kotonoha*
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
// 2016/05/18 ver1.1 Implemented AnimationWait param
// 2016/04/06 ver1.0 First release
//
// --------------------------------------------------------------------------
/*:
* @plugindesc Plays an animation for counterattack in battle
* @author kotonoha (http://ktnh5108.pw/)
*
* @help
* Animation for battle when counterattacking.
*
* @param AnimationID
* @desc Animation ID set for counterattack.
* @default 0
*
* @param AnimationWait
* @desc Delay time after animation was used.
* @default 60
*
*/

(function() {

    var parameters = PluginManager.parameters('CounterAnimation');
    var AnimationID = Number(parameters['AnimationID']);
    var AnimationWait = Number(parameters['AnimationWait']);

    BattleManager.invokeCounterAttack = function(subject, target) {
        var action = new Game_Action(target);
        if (AnimationID !== 0) {
            target.startAnimation(AnimationID, false, 0);
            this._logWindow.push('wait');
            if (AnimationWait !== 0) {
                this._logWindow._waitCount = AnimationWait;
            }
            action.setAttack();
            action.apply(subject);
            this._logWindow.displayCounter(target);
            this._logWindow.displayActionResults(subject, subject);
        }
    };
   
})();
You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/lhgq4xjdhym93is/CounterAnimation.js?dl=1
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Besides my Might and Magic inspired project, I have always wanted to make a Fire Emblem-like game. Time is the culprit... Between life, composing music packs, and working on a game can it be done!? The tactical plugins for MV work quite well based on what I have tested.
Yaaay! My second public script is out and approved! A VX Ace Final Fantasy IX styled Throw Script!

I look forward to all the constructive feedback I get but most importantly I hope everyone who ends up using it enjoys!

Yaaaay! Making scripts is fun lol. :D
When you're lost out therrrrre and you're alllll alone, ahwahwah waitin, to carry you hooooommmme, uhhheverywhere you look! (someone hit me with those backing vocals)
X.X cant focus... too many thing want do... help!
Day 2 of teaching MV, student can move cat across the map.

Forum statistics

Threads
100,525
Messages
976,813
Members
132,080
Latest member
nwr
Top