Hey all!
I've been using kgPanels with Vanilla and TBC to outline my unitframes with a nice border.
Now the scripts I used with TBC don't work with the Classic version (1.13.x).
I used this to show and hide the border of the target unitframe when no target is selected:
OnLoad
Code:
self:RegisterEvent("UNIT_TARGET")
self:Hide()
OnEvent
Code:
if UnitExists("target") = nil then
self:Show()
else
self:Hide()
end
OnUpdate
Code:
if UnitExists("target") = nil then
self:Show()
return
else
self:Hide()
return
end
I've tried different variations and looked through the API but haven't been succesful. The frame is hidden when the game load, will show when I select a target but won't hide when I deselect it.
Please help