I was wondering if there's a way to change the position of an actor when he's added to the party, and make him the leader. I couldn't find any method to do it, so i hope that someone can help me
Thank you in advance.
Thank you in advance.
$gameParty.swapOrder(0, $gameParty.members().length - 1)
var all_members = $gameParty.allMembers();
var actor_id_to_find = 2; // This is the actor ID of the actor you have added and you want to swap;
var position_to_swap = 0;
for(var i = 0; i < all_members.length; i++) {
if(all_members[i].actorId() === actor_id_to_find) {
position_to_swap = i;
break;
}
}
$gameParty.swapOrder(0, position_to_swap);
naomex1, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/change-party-leader.114641/