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,273
Reaction score
9,696
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,824
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 Profile Posts

Not an RPG Maker Update but I'm happy to say that I finally passed my drivers written test. Which makes me a happy guy.
FWRu-cYXkAAAUbl
Have you ever been in such a luck streak you felt fear something was wrong?
I'm going to be adding in combat animations, revamping the UI and putting in a new cutscene this week, so this is your last chance to play the MC:RIS demo in its original form! Say you were there since the beginning! https://qos.itch.io/infinite-sadness
I added reflections and shadows. Though one of the party seems to have no reflection, is floating, with glowing eyes. I'm sure it's fine.
p7O1sjG.png
Well. *That* was an entertaining fustercluck — and that’s not meant nearly as sarcastically as it sounds. I just had to make four different versions of the same conversation:
1: Attained MacGuffin.
2: Have not attained MacGuffin, but know its location.
3: Do not know MacGuffin’s location, but have a good idea where to find it.
4: Do not know where to look for MacGuffin.
Yep, feels good to be back. ^.^

Forum statistics

Threads
123,113
Messages
1,154,071
Members
161,444
Latest member
Mefiesto79
Top