First off, thank you for reading this. I hope should a solution be found, this helps other people as well.
I am using the HUD Maker Ultra Pro plugin for MZ and the goal was to make experience bars for the party.
I found I needed to use the custom code feature, shown here in a screenshot:
So, I looked at the "RPG Maker MZ Script Call Reference" sheet found here:
RPG Maker MZ Script Call Reference
I assumed, because in the "Script Call Reference Sheet" the syntax was:
... that [n] would be replaced with the number of the party member.
For the Main Actor, Hero 1, I ended up using the following for the start of the gauge value:
... and the following for the "maximum" of the gauge value:
When playtesting everything worked fine to my knowledge.
So, I began adding the party HUD and added the second hero, Hero 2.
For the start of the gauge I used:
... and the following for the "maximum" of the gauge value:
I checked the console, and found via "typeof" it was indeed, "undefined."
So, what I think is going on here is, the exp isn't being set for party member 2, when I try to start a new game or load a save.
Is there a way I can define this "undefined" "currentExp" - I apologize I am just starting to learn JavaScript so I will likely need some guidance.
Sorry for the long post, I wanted to be as clear as possible.
Thank you, in advance.
I am using the HUD Maker Ultra Pro plugin for MZ and the goal was to make experience bars for the party.
I found I needed to use the custom code feature, shown here in a screenshot:
So, I looked at the "RPG Maker MZ Script Call Reference" sheet found here:
RPG Maker MZ Script Call Reference
I assumed, because in the "Script Call Reference Sheet" the syntax was:
JavaScript:
$gameParty.members()[n].currentExp()
... that [n] would be replaced with the number of the party member.
For the Main Actor, Hero 1, I ended up using the following for the start of the gauge value:
JavaScript:
return $gameParty.members()[0].currentExp() - $gameParty.members()[0].currentLevelExp();
... and the following for the "maximum" of the gauge value:
JavaScript:
return $gameParty.members()[0].nextLevelExp() - $gameParty.members()[0].currentLevelExp();
When playtesting everything worked fine to my knowledge.
So, I began adding the party HUD and added the second hero, Hero 2.
For the start of the gauge I used:
JavaScript:
return $gameParty.members()[1].currentExp() - $gameParty.members()[1].currentLevelExp();
... and the following for the "maximum" of the gauge value:
JavaScript:
return $gameParty.members()[1].nextLevelExp() - $gameParty.members()[1].currentLevelExp();
I checked the console, and found via "typeof" it was indeed, "undefined."
So, what I think is going on here is, the exp isn't being set for party member 2, when I try to start a new game or load a save.
Is there a way I can define this "undefined" "currentExp" - I apologize I am just starting to learn JavaScript so I will likely need some guidance.
Sorry for the long post, I wanted to be as clear as possible.
Thank you, in advance.