KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
353
Reaction score
474
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,118
Reaction score
610
First Language
English
Primarily Uses
RMMV
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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,443
Reaction score
14,813
First Language
English
Primarily Uses
RMMV
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
 

KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
353
Reaction score
474
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

cst.PNG
What would you assume this thing was/is?
1623528827049.png
Ah yes. Just the reference I was looking for to use for my portrait. Thanks Google.
BCj
Made a logo for Mana Star :D
330bb1fde7bb06b13e23fefd83501163.png
it's e3 season again..!

Forum statistics

Threads
112,176
Messages
1,066,359
Members
145,766
Latest member
Xescar
Top