Quantcast kgPanels script to show/hide panels when having a target - WoWInterface
Thread Tools Display Modes
12-29-19, 06:56 AM   #1
matthenry
A Defias Bandit
Join Date: Nov 2019
Posts: 2
Question kgPanels script to show/hide panels when having a target

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

Last edited by matthenry : 12-29-19 at 11:57 AM.
  Reply With Quote
12-29-19, 11:59 AM   #2
matthenry
A Defias Bandit
Join Date: Nov 2019
Posts: 2
Has been solved. I forgot to put
Code:
 = nil
in the code of this posting and that is actually the solution.

Thanks for reading.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgPanels script to show/hide panels when having a target

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off