So I'm using SumRndmDude's Hud Maker plugin to make a custom battle UI. I have several states that operate using custom properties attached to the battler with the state via Yanfly's Buffs & States Core; for example
The idea is to be able to have the same state or mechanic applied to multiple different battlers and to be able to neatly track the necessary data by attaching the relevant variables to those battlers.
I have several UI elements I want to construct using the information stored in these custom properties. My initial plan was to use Hud Maker's "Text" and "Picture EX" tools; for example, I might want a picture near an actor's portrait to indicate the element of the last spell they used. For that, my plan would be to have a picture in the Pictures/SumRndmDde/Pictures folder with the title of each element; then, I'd use a "Picture EX" hud element to represent that element using the aforementioned property:
Ideally, with all the pictures named correctly, this would show the picture for the user's last used element if they'd cast a spell during this fight, or a default "no element" picture otherwise.
Unfortunately, for whatever reason, whenever I try to use the existence of a custom property like this as the condition for a ternary operator in Hud Maker elements, the element simply produces an error. The error goes away if I remove the custom property condition. Does anyone have any advice as to what I might be doing wrong?
Code:
user.lastElement = this.item().damage.elementId;
user.noElement = "noElement";
The idea is to be able to have the same state or mechanic applied to multiple different battlers and to be able to neatly track the necessary data by attaching the relevant variables to those battlers.
I have several UI elements I want to construct using the information stored in these custom properties. My initial plan was to use Hud Maker's "Text" and "Picture EX" tools; for example, I might want a picture near an actor's portrait to indicate the element of the last spell they used. For that, my plan would be to have a picture in the Pictures/SumRndmDde/Pictures folder with the title of each element; then, I'd use a "Picture EX" hud element to represent that element using the aforementioned property:
Code:
${$gameParty.leader().lastElement ? $dataSystem.elements($gameParty.leader().lastElement) : $gameParty.leader().noElement}
Ideally, with all the pictures named correctly, this would show the picture for the user's last used element if they'd cast a spell during this fight, or a default "no element" picture otherwise.
Unfortunately, for whatever reason, whenever I try to use the existence of a custom property like this as the condition for a ternary operator in Hud Maker elements, the element simply produces an error. The error goes away if I remove the custom property condition. Does anyone have any advice as to what I might be doing wrong?