[SOLVED] Party Member ID Script Call

Status
Not open for further replies.

Speedvore

RPG Making since RM95!
Member
Joined
Oct 3, 2015
Messages
26
Reaction score
9
First Language
English
Primarily Uses
RMMZ
I'm trying to reference the agility parameter of a party member, rather than a specific actor in the database since the party will be constantly changing/chosen by the player throughout my game.

So basically what I'm trying to find is the agility parameter of party members 1, 2, 3, and 4.

I know that you can reference the 2nd actor's agility parameter like this:
Code:
$gameActors.actor(2).agi
And the 2nd enemy's agility parameter like this:
Code:
$dataEnemies[2].params[6]
What is the script call to reference the 2nd party member?
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,451
First Language
English
Primarily Uses
N/A
$gameParty.members()[1].agi
$gameParty.members() returns an array. Since arrays are 0-based, you would use 1 to get to the 2nd member.
 

Speedvore

RPG Making since RM95!
Member
Joined
Oct 3, 2015
Messages
26
Reaction score
9
First Language
English
Primarily Uses
RMMZ
$gameParty.members()[1].agi
$gameParty.members() returns an array. Since arrays are 0-based, you would use 1 to get to the 2nd member.
Thank you so much for your quick response! It works perfectly for me now :)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,228
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top