What I am trying to do next isn't nearly as simple as I thought it would be. I would like the script to check if the next actor is downed (0 HP), and if so skip over them, and switch to the next living actor. This is important because I am using an action battle system and can't have the player controlling a dead character. I haven't been able to work this out myself, and have been getting all sorts of error messages in whatever I try.
The script as I have it now (still switches to dead characters if they're next in the order) is as follows.
Spoiler
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 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::playerSwitch::Switch_Button) RPG::SE.new(Soulpour::playerSwitch::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