I'm sure there's a relatively quick way to use a script call to get the maximum value of the Luck ($gameActors.actor(actorID).param(7)) statistic of all party members. But I keep getting a crash ("TypeError: Cannot read property 'param' of null") when doing this:
to put it into variable 2. I've already discovered that you have to use gameParty.size() as .length returns 0 even with 6 in the party, and .size() is correct.
And tried commenting out the "maxLK=" line and getting last actor value with .setValue(2,actor) but that's showing "[object Object]"!
Code:
◆Script:for(var i=0,actor=0,maxLK=0; i<$gameParty.size(); i++) {
: : actor=$gameParty.members();
: : maxLK=Math.max(maxLK,$gameActors.actor(actor).param(7));
: :}
: :$gameVariables.setValue(2,maxLK);
to put it into variable 2. I've already discovered that you have to use gameParty.size() as .length returns 0 even with 6 in the party, and .size() is correct.
And tried commenting out the "maxLK=" line and getting last actor value with .setValue(2,actor) but that's showing "[object Object]"!