MV Text Code if an Actor is not the leader

I know this text code checks who is the leader: $gameParty.leader().actorId() === 1
I was wondering what the text code would be if a certain actor is a not the leader. For example would I check if Actor 3 is the second party member in the formation.
The word you're looking for is "script," from JavaScript, or just "code" - all computer code beyond binary is in text.

I was wondering what the text code would be if a certain actor is a not the leader. For example would I check if Actor 3 is the second party member in the formation.
You're asking two different things here.

Do you just want to know whether actor 3 is not the leader?
Code:
$gameParty.leader().actorId() != 3

Or do you want to know if actor 3 is specifically the second party member?
Code:
$gameParty.members().indexOf($gameActors.actor(3))==1
Do you NEED this as code? The Control Variables event command will let you put the actor id of a certain party member (position) into a variable, then you can use that variable in a conditional branch:

Code:
Control Variables ... Game Data > Party > Member #2 > Actor Id
The word you're looking for is "script," from JavaScript, or just "code" - all computer code beyond binary is in text.


You're asking two different things here.

Do you just want to know whether actor 3 is not the leader?
Code:
$gameParty.leader().actorId() != 3

Or do you want to know if actor 3 is specifically the second party member?
Code:
$gameParty.members().indexOf($gameActors.actor(3))==1
Sorry for not being clear. I want to know whether actor 3 is the second member of the party.

I tested the second line of code you provided and it worked like a charm.

Original thread: https://forums.rpgmakerweb.com/threads/text-code-if-an-actor-is-not-the-leader.136618/