KRefreshFormation MV
#1
KRefreshFormation MV

by Kyonides

Introduction

You can press L or R buttons to change the current formation while walking through the map.
In the RPG Maker series, PageUp and PageDown buttons serve the same purpose as L and R, respectively.

The Plugin

Code:
//========================================================================================
// KRefreshFormation MV.js
//========================================================================================
/*:
* @plugindesc Change the Current Party's Formation with a Button!
* version 0.1.0
* @author Kyonides Arkanthes
*
* @param None
*
* @help Instructions:
*   While playing on the map, simply hit:
*     L or R buttons
*     PageUp or PageDown buttons
*/

Game_Party.prototype.swapFormation = function(dir) {
  if (this._actors.size < 2) { return; }
  if (dir == "left") {
    this._actors.push(this._actors.shift());
  } else if (dir == "right") {
    this._actors.unshift(this._actors.pop());
  }
  $gamePlayer.refresh();
};

const Game_Player_update_refresh_heroes = Game_Player.prototype.update;

Game_Player.prototype.update = function(sceneActive) {
  if (Input.isTriggered('pageup')) {
    SoundManager.playCursor();
    $gameParty.swapFormation("left");
  } else if (Input.isTriggered('pagedown')) {
    SoundManager.playCursor();
    $gameParty.swapFormation("right");
  }
  Game_Player_update_refresh_heroes.call(this, sceneActive);
};

Terms & Conditions

Free for use in any kind of project. There is nothing else you should know about them.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }




Users browsing this thread: 2 Guest(s)