Originally Posted by sacrife
I'm trying to create a check to check if me (as a healer) is targeting one in the party and if so highlight that frame so I know which one I'm targeting without looking out my target frame.
|
You'd need to register for the PLAYER_TARGET_CHANGED event, and check each frame's unit when it fired:
Code:
local HighlightTarget = function(self)
if UnitIsUnit(target, self.unit) then
-- show the highlight on this frame
else
-- hide the highlight on this frame
end
end
Then, in your spawn function:
Code:
self:RegisterEvent("PLAYER_TARGET_CHANGED", HighlightTarget)
table.insert(self.__elements, HighlightTarget)
If you want to create a special texture or something to show, do it in the same place.
Originally Posted by sacrife
If I have show self in party set to true and I have a check for hp deficit for partymembers 1 through 4, how do I check myself? Currently I'm just doing a test for if min~=max and (unit=='party1' etc to 4)
Using 5 won't work.
|
The unit on the "player frame in party" is just
player. In order to distinguish between it and the "normal" player frame, you'll need to check something else. For example, you could check if the frame's parent is your party group header. Or, if your party frames are a different size than your player frame, check that.