I would like to show a panel depending on what boss is targeted.
Something like: If boss1 and target are the same, then show.
Is this an event? Can it be done by OnUpdate?
Think it needs to use unitisunit.
Frame has to be hidden on load.
EDIT: I've got this working ish.
Thing is, usually ppl target the boss before the encounter start, so the Boss frames aren't displayed yet, this means that if I target the boss before the encounter starts, the panel won't be displayed until I change target then back to the boss.
This is how I've done it:
Code:
OnLoad
self:RegisterEvent("PLAYER_TARGET_CHANGED")
OnEvent
if UnitIsUnit("boss1","target") then
self:Show()
else
self:Hide()
end
I need a better way of updating the panel