I'm using a Combatant HUD to display info (name, level, stats, etc.) when I click on a combatant in field and battle. In Combatant Settings of the HUDs menu, I select:
- Combatant Type: Group
- Start Index Offset: 0
- Limit List Length: Checked
- Maximum Length: 1
Displayed Groups: Player, Ally and Enemy.
Then, in code, I set a var named "combatant" to the combatant on which I clicked with a raycast and then I use:
combatantIndex = ORK.Game.Combatants.GetAll().FindIndex(x => x == combatant);
((CombatantHUDSetting)examineHUD.settings).groupStartOffset = combatantIndex;
It works perfectly when I click on members of the player group, but when I click on an enemy, it displays the info of a player combatant instead...
I can make it work when I uncheck "Displayed Groups: Ally". However, if all 3 are checked, it won't display enemies.
I think there is some kind of bug there...Right?
It might be easier to work with the Status Requirements in the HUD's display conditions - you can use it to only display combatants that match a status requirement, e.g. adding a (hidden) status effect to the clicked combatant to mark it as displayed.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Now however, I have a problem with updating the HUDs information. For instance, if I hit an opponent and reduce his Hit Points, the Hit Points status is not updated in the HUD until I click another time on the combatant to "refresh" its HUD. Is there a way to make the HUD update itself as soon as a status that it displays is changed? In Menu Settings/HUD Settings, HUD Check Time is set to 1, but it never seems to change...
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Is there something I can do to automatically update the display of a combined Status Value obtained from a formula?
It happens that my formula used "consumable" type status values... When I changed these values to normal, everything was fixed!
I should have red the Help section more carefully! Nice job on your side for the Help text!
The next update will probably make this easier, as you can use game events upon status value changes :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!