xlucky_rat

They/Them
Veteran
Joined
May 16, 2022
Messages
77
Reaction score
83
First Language
English
Primarily Uses
RMMV
Hello all! I am looking for a way to set a variable to be the first party member's stats. I've found how to set a variable to be a specific character's stats, but no way to set it to be the first slot's stats. Any help would be appreciated!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,277
Reaction score
9,700
First Language
German
Primarily Uses
RMMV
that is the one thing that is a bit convoluted by eventing.

basically you'll have to use control variable to get the ID of the actor in the first party position, followed by a series of conditional branches "if ID=n, use control variable to get data from actor n"
 

xlucky_rat

They/Them
Veteran
Joined
May 16, 2022
Messages
77
Reaction score
83
First Language
English
Primarily Uses
RMMV
that is the one thing that is a bit convoluted by eventing.

basically you'll have to use control variable to get the ID of the actor in the first party position, followed by a series of conditional branches "if ID=n, use control variable to get data from actor n"
As long as it's possible, that's good enough for me. Thank you!
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,828
Reaction score
2,170
First Language
Portuguese - Br
Primarily Uses
RMMZ
Yeah, I agree with Andar. This can be tedious if you have a lot of actors.
Another way for doing this faster and easy is to use a script call:
JavaScript:
const varId = 3
const attackStatus = $gameParty.leader().param(2)

$gameVariables.setValue(varId, attackStatus)

$gameParty.leaders() - Will always return the first actor on the party.
param(Id) - This will return the value of the regular parameters. Replace id with the parameter you want to check:
  • 0 = MHP
  • 1 = MP
  • 2 = ATK
  • 3 = DEF
  • 4 = MAT
  • 5 = MDF
  • 6 = AGI
  • 7 = LUK
 

Latest Threads

Latest Posts

Latest Profile Posts

The main game of my trilo/saga 50%OFF on Steam..... its now or never more
I swap between Ace and MZ so I can stay fresh but - what do you mean you can use subfolders in the plugin's folder for easier organization!?
Did some new music again, praise be. To the next song!
Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Forum statistics

Threads
123,137
Messages
1,154,237
Members
161,472
Latest member
lestat90
Top