UserFunction; SobGroup_GetHealth - HWRM/KarosGraveyard Wiki
Gets the current health fraction, similar to how
SobGroup_SetHealth works with HP fractions.
SobGroup_GetHealth("example-group"); -- fraction such as '0.5', if at half health.
--- Gets the current HP of the group (as a fraction, ala SobGroup_SetHealth). -- @param group [string] The SobGroup who's health to check. -- @return [number] The current health as a fraction of the total. function SobGroup_GetHealth(group) local max_health = SobGroup_MaxHealthTotal(group); local current_health = SobGroup_CurrentHealthTotal(group); return (current_health / max_health); end
||The SobGroup who's health fraction will be returned.|
||The health fraction (between
Need to update page for
SobGroup_MaxHealthTotal, which is probably useful in tandem with this function.
Updated Formatting? Initial
Updated for HWRM? Initial