KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
359
Reaction score
480
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,171
Reaction score
641
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,553
Reaction score
14,856
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
359
Reaction score
480
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

0800d9e637692b8fe70e5bf0f8d410af.jpg

Im just gonna get a plugin or two....or five hundred.
MV/MZ dev: "I'll build an APK to run on Android mobile devices!"

Microsoft: "Here is the great news. Now you can play android apps on Windows 11!"
Work-in-progress dwarf character. Got him mostly there but he needs some earrings or hair jewellery.
TestChara-14.gif
I cant not for the life of me figure out where this bomb item comes from.

Forum statistics

Threads
112,548
Messages
1,069,117
Members
146,239
Latest member
Garnatxa
Top