View Single Post
08-29-09, 09:11 PM   #48
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Yhor
I'll do my best here, since I don't know what your unitframes are.

To accomplish this, you could set the parent frame to your target unitframe, this will make the cave graphic inherit the visibility of your target unitframe. Then set anchor_frame to the frame you want it anchored to. This would remove the need for a script.

Alternatively, you can keep it parented where it is and use this OnUpdate:
Code:
function(self)
  if not UnitName'target' then self.bg:SetAlpha(0) else self.bg:SetAlpha(1) end
end
You can't Hide() the panel because Hide() will stop the OnUpdate from running.
  Reply With Quote