#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def party_leader(actor_id)
# Get the actor
actor = $game_actors[actor_id]
# If the actor to become leader is already in the party. Kill him...
@actors.delete(actor) if @actors.include?(actor)
# Lose the current leader.
@actors.shift
# Add new management for less pay.
@actors.unshift(actor)
# Refresh player
$game_player.refresh
end
end
I know its not the scripting forum but I think this will still help you out. Open up your game and then the script editor. F11's the shortcut. On left side, scroll all the way down until you see "Main". Right click "Main" and select insert. Name this section "Game_Party", now paste the code above into the section on the right. Click apply and exit the script editor.
Now inside your game create an event and lets say you want actor 5 to step in for the party leader. Go to the last page of the event commands and select "Script..."
Use this line:
$game_party.party_leader(5)
This will replace your party leader with actor 5 in the database.
I guess the event command way is to save the party members that aren't the leader to variables than remove everyone than add the new leader and the party members that were saved. But that sounds like too much work for me.
Good luck with it Jking! :thumb: