View Single Post
04-14-18, 07:36 PM   #7
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
texture:Show and Hide will not work in combat. Change your coding to this...

Code:
local smallcircle5 = CreateFrame("Frame", "SmallCircleTopCenter")
smallcircle5:SetFrameLevel(self.Health:GetFrameLevel() + 5)

local smallcircle5texture = smallcircle5:CreateTexture(nil, "ARTWORK")
smallcircle5texture:SetTexture(nil)
smallcircle5texture:SetPoint('CENTER', self, 46, 35)
smallcircle5texture:SetSize(26, 26)
smallcircle5texture:SetTexCoord(0, 1, 0, 1)

smallcircle5:RegisterEvent("PLAYER_ENTERING_WORLD")
smallcircle5:RegisterEvent("GROUP_ROSTER_UPDATE")
smallcircle5:SetScript("OnEvent", function(self, event, ...)

   if IsInGroup() then
      smallcircle5texture:SetTexture(m.textures.smallcircle)
   else
      smallcircle5texture:SetTexture(nil)
   end

end)
__________________
AddOns: Tim @ WoWInterface
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List

Last edited by Tim : 04-14-18 at 07:38 PM.
  Reply With Quote