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!
Set Variable to First Party Member's Stats
RPG Maker MV Supportthat 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"
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!
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:
$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:
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
Original thread: https://forums.rpgmakerweb.com/threads/set-variable-to-first-party-members-stats.147824/