# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Simple Player Swapping# Author: Soulpour777# Date Scripted: 12:18PM, April 5, 2014# Description: Allows the player to switch on to characters by pressing a left# and right button (user defined)# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= module Soulpour module PlayerSwitch # Which button should be pressed to switch party members from the # formation? # :R = W # :L = Q Switch_Button = :L # What is the name of the sound effect played when you switch players? # Sound Effect should be inside the SE folder or inside the RTP Button_Effect = "Absorb1" endend class Game_System #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :leader_switch #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias :soul_initialize_on_game_system :initialize #-------------------------------------------------------------------------- # * Object Initialization (Aliased) #-------------------------------------------------------------------------- def initialize soul_initialize_on_game_system @leader_switch = 1 endend class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias :soul_frame_update_on_scene_map :update #-------------------------------------------------------------------------- # * Frame Update (Aliased) #-------------------------------------------------------------------------- def update soul_frame_update_on_scene_map if Input.trigger?(Soulpour:

layerSwitch::Switch_Button) RPG::SE.new(Soulpour:

layerSwitch::Button_Effect, 100, 100).play $game_party.swap_order($game_system.leader_switch, 0) if $game_system.leader_switch == ($game_party.all_members.size) - 1 $game_system.leader_switch = 1 else $game_system.leader_switch += 1 end end end end