lowest_party_member
The lowest_party_member function identifies the party or raid member with the lowest health percentage within a specified range. This function is useful for targeting the most injured member for healing or other support actions.
Parameters
objects(table): A table containing the unit identifiers (such as "player", "party1", "party2", etc.) to check.
Returns
heal_target(string): The identifier of the party or raid member with the lowest health percentage.
Example Usage in Lua
Here is an example of how to use the lowest_party_member function in Lua:
local api = ...
-- Function to find and print the party or raid member with the lowest health percentage
function PrintLowestPartyMember(objects)
local heal_target = api.lowest_party_member(objects)
print("The party or raid member with the lowest health percentage is: " .. heal_target)
end
-- Example usage: Find and print the party or raid member with the lowest health percentage
local party_members = {"party1", "party2", "party3", "party4"}
PrintLowestPartyMember(party_members)