Okay I have everything lined up but just need your help on a few things with the player frame. Just spinner 4.
I tried flipping the texture for power but it’s not letting me do the whole SetTexCoord.
I fixed it by just flipping it on photoshop for now as a new texture. ( I wanted to make it More easy on you less to deal with )
I have health showing and working for player now. (progress)
So now it’s just the background texture for health on the player frame.
The background CenterOverlay texture for Health on the player frame hides and shows behaving the same way as target. ( shows when I click on target and hides be when I click off target )
I must be forgetting something I know it’s something easy probably like a function(self)
but I’m having a hard time trying to figure out that one. I know it was setup for target not player so that’s why it hides or shows on clicking a target still lol.
local spinner4 = CreateSpinner(UIParent)
spinner4:SetPoint('CENTER', PlayerFrame.PlayerFrameContainer.PlayerPortraitMask)
spinner4:SetSize(116, 108)
spinner4:SetTexture("Interface\\Addons\\Images\\Ring_20px")
spinner4:SetVertexColor(0, 1, 0)
spinner4:SetClockwise(false)
spinner4:SetReverse(false)
spinner4:Hide()
spinner4.Background = spinner1:CreateTexture()
spinner4.Background:SetDrawLayer("BACKGROUND", -1)
spinner4.Background:SetSize(155, 142)
spinner4.Background:SetPoint("CENTER", PlayerFrame.PlayerFrameContainer.PlayerPortraitMask)
spinner4.Background:SetTexture("Interface\\Addons\\Images\\FullCircleFrameTwo")
local CenterOverlay = CreateFrame("Frame", nil, spinner4)
CenterOverlay:SetFrameLevel(0)
CenterOverlay:SetSize(100, 100)
CenterOverlay:SetPoint("CENTER", PlayerFrame.PlayerFrameContainer.PlayerPortraitMask)
CenterOverlay.Texture = CenterOverlay:CreateTexture()
CenterOverlay.Texture:SetAllPoints()
CenterOverlay.Texture:SetTexture("Interface\\Masks\\CircleMaskScalable")
CenterOverlay.Texture:SetVertexColor(0, 0, 0)
local healthmax = 0
local health = 0
spinner4:RegisterUnitEvent("UNIT_HEALTH", player)
spinner4:RegisterEvent("PLAYER_ENTERING_WORLD")
spinner4:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
if not UnitExists("player") then
spinner6:Show()
return
end
spinner4:Show()
end
healthmax = UnitHealthMax("player")
health = UnitHealth("player")
local h = health / healthmax
spinner4:SetValue(h)
end)
local spinner5 = CreateSpinner(UIParent)
spinner5:SetPoint('CENTER', PlayerFrame.PlayerFrameContainer.PlayerPortraitMask)
spinner5:SetSize(158, 148)
spinner5:SetTexture("Interface\\Addons\\Images\\DragonCircleBackgroundPlayer")
spinner5:SetVertexColor(1, 1, 1)
spinner5:SetClockwise(true)
spinner5:SetReverse(false)
spinner5:Hide()
local powermax = 0
local power = 0
spinner5:RegisterUnitEvent("UNIT_POWER_FREQUENT", player)
spinner5:RegisterEvent("PLAYER_ENTERING_WORLD")
spinner5:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
if not UnitExists("player") then
spinner5:Hide()
return
end
spinner5:Show()
end
powermax = UnitPowerMax("player")
power = UnitPower("player")
local p = power / powermax
spinner5:SetValue(p)
end)
local spinner6 = CreateSpinner(UIParent)
spinner6:SetFrameLevel(1)
spinner6:SetSize(90, 90)
spinner6:SetPoint('CENTER', PlayerFrame.PlayerFrameContainer.PlayerPortraitMask)
spinner6:SetTexture("Interface\\Masks\\CircleMaskScalable")
spinner6:SetVertexColor(0.2, 0.2, 0.8)
spinner6:SetClockwise(true)
spinner6:SetReverse(false)
spinner6:Hide()
local manamax = 0
local mana = 0
spinner6:RegisterUnitEvent("UNIT_POWER_UPDATE", "player")
spinner6:RegisterEvent("PLAYER_ENTERING_WORLD")
spinner6:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_ENTERING_WORLD" then
if not UnitExists("player") then
spinner6:Hide()
return
end
spinner6:Show()
end
local mana = UnitPower("player", Enum.PowerType.Mana)
if not mana or mana == 0 then
spinner6:SetValue(0)
return
end
local manaMax = UnitPowerMax("player", Enum.PowerType.Mana)
spinner6:SetValue(mana / manaMax)
end)
I almost have it I changed the basic stuff for the player frame the best I could to make it easy... I hope lol `(https://imgur.com/a/ocrOHSr)`
And that's a link to some pics describing what's going on with the code.
Target frame is working pretty well though :grin: