Setting a specific actor as party leader

Scenario:


In my game there's a hub where the main character can talk to his party members.


The party members are set up as a seperate events.


Problem:


The game is set up so that the player can change the formation of their party.


This leads to the situation where a party member can talk to himself as a seperate event.


What I want:


When the party enters the hub, the specific actor should be set as the party leader.


What I have:


In rpgmaker VX Ace I can:


Gather player followers so it's only 1 character showing.


Change player followers so that they don't spread out again.


Change formation access so that the player can't rechange the formation.


I know I could remove all party members except the desired one and add them again when the player leaves the hub, but that is a bit of a messy event spaghetti.


As an event, it should be something like:


Is Partyleader == Actor-01 in formation 01?


If not: Set Actor-01 in formation 01.
Yanfly Engine Ace - Party System


http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/


http://dl.dropboxusercontent.com/u/17078211/Scripts/YEA/SYF%20-%20Soulpour%20Yanfly%20Party%20System%20Fix.txt


It's a bit more robust then the default Party System but allows you to lock Members


There's a Bug Fix on the page for swap order and bellow is the Bug Fix For Locked Actors





This tells how to change the formation via scripts


idx1 = 0
idx2 = $game_actors[1].index
$game_party.swap_order(idx1, idx2)
lock_actor($game_actors[1].id)


So you could change the formation to what you want and lock the Member until they leave.

Original thread: https://forums.rpgmakerweb.com/threads/setting-a-specific-actor-as-party-leader.59501/