public static int GetCombatantStatusValue(GameObject item, string _guid)
{
if (ORKComponentHelper.GetCombatant(item) != null)
{
Combatant combatant = ORKComponentHelper.GetCombatant(item);
Debug.Log("GetCombatantStatusValue for " + item.name + "succeeded and gave " + combatant.Status[ORK.StatusValues.GUIDToIndex(_guid)].GetValue() );
return combatant.Status[ORK.StatusValues.GUIDToIndex(_guid)].GetValue();
}
Debug.Log("GetCombatantStatusValue for " + item.name + "failed ");
return 0;
}
It looks like you're new here. If you want to get involved, click one of these buttons!
Generally, status values can be negative, if they're set up to allow that by their min/max value settings. The default setup for status is in the positive value range, though.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If the function failed in any way, it'd cause an error message in the Unity console.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I had to delay by one frame ORKComponentHelper.GetCombatant(this.gameObject) and now it works.
Still trying to understand where that delay is coming from.
Thank you for the help Nicholas :)