09-19-2024, 08:12 AM
KRefreshFormation VX + ACE
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.
VX & VX ACE Version
Code:
# * KRefreshFormation VX & ACE
class Game_Party
def swap_formation(dir)
return if @actors.size < 2
if dir == :left
@actors << @actors.shift
elsif dir == :right
@actors.unshift @actors.pop
end
$game_player.refresh
end
end
class Game_Player
alias :kyon_refresh_form_gm_plyr_up :update
def update
if Input.trigger?(Input::L)
Sound.play_cursor
$game_party.swap_formation(:left)
elsif Input.trigger?(Input::R)
Sound.play_cursor
$game_party.swap_formation(:right)
end
kyon_refresh_form_gm_plyr_up
end
end
Terms & Conditions
Free for use in any kind of project. There is nothing else you should know about them.