Check party formation

hi! hope everyone's doing well today! 😍

i have an instance in my game that i need help with. right now, i'm working on a party swap system that is mostly functional, but in order for the player to progress, certain actors must be in the #1 slot in order to proceed. if it helps at all, this is only a two actor party!

for example: billy and steve are in the party together. in order to proceed to the next room, the player must swap to billy in order to open the door. if the player is still stuck on steve, then they will not be able to continue.

i've tried to use some of my eventing skills, but so far nothing has panned out... any chance i could get some help on where to begin? 😅
Within a conditional branch, select Script and insert the following code:
JavaScript:
 $gameParty.leader().id === 1;

Replace `1` with the ID number of the actor you want to check.
So, assuming that Billy is the first actor in the database, enter `1`.

This script checks who the first member of the party is, and placed within a conditional branch, it works like any other check
Alternatively, without scripting, you can do this:
  • Store the leader's actor ID: Control Variables -> Game Data -> Party -> Member #1.
  • Check that ID: Conditional Branch -> Variable.
oooh my gosh, both methods work and work super well! for a minute there i was worried i'd never get this solved...

thank you both! 😊
Within a conditional branch, select Script and insert the following code:
That won't function, there's no such property as id

You could do $gameParty.leader().actorId() == 1 but I'd prefer @caethyril's method to use event commands if they can access the same data.

Original thread: https://forums.rpgmakerweb.com/threads/check-party-formation.172396/