class Game_Party
def switch_members(position_a, position_b)
return if @actors[position_a].nil? || @actors[position_b].nil?
@actors[position_a], @actors[position_b] = @actors[position_b], @actors[position_a]
$game_player.refresh
end
end
I wrote that real quick, so if it doesn't work, let me know.
To use:
Call Script: $game_party.switch_members(position_a, position_b)
Replace position_a with a number that the position of the actors is in. Same goes for postion b.
For example, switching the 2nd and 4th, you would use:
Call Script: $game_party.switch_members(1, 3)
1st and 4th
Call Script: $game_party.switch_members(0, 3)
Note that the postion in the party is always subtracted by 1.
First = 0, Second = 1, Third = 2, Fourth = 3
Let me know if it doesn't work or you don't understand. I imagine you can just use a event with the Key Press Command (or whatever it is called. I don't use events. :P)