Hello,
As the title suggests, I'm trying to write some code to get a combatant's selected defence subattribute. It's for a HUD to show HP, etc.
Looking at the ORK source code I've been able to get a combatant's defence attribute and what appears to be the list of subattributes, but I cannot figure out how to find the subattribute I set in the ORK Framework.
var defAttr = combatant.Status.GetDefenceAttribute(0).BaseAttribute;
Debug.Log($"{combatant.GetName()} Defence Attr {defAttr.GetName()}");
var defSubAttr = defAttr.attribute[1];
Debug.Log($"Sub Attr {defSubAttr.GetName()}");
Here's an example of how the Defence Attribute is set for a combatant:
Thanks for your help
DefAttrID defID = combatant.Status.GetDefenceAttributeID(index)
DefenceAttributeSetting defenceAttribute = ORK.DefenceAttributes.Get(defID.RealID);
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
DefAttrID defID = combatant.Status.GetDefenceAttributeID(index)
DefenceAttributeSetting defenceAttribute = ORK.DefenceAttributes.Get(defID.RealID);
DefenceSubAttribute subAttribute = defenceAttribute.attribute[defID.GetID()];
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!