Hey, lately I’ve been configuring a lightweight UI and ran into an issue. Got 2 scripts to move the unitframes:
The first one
PlayerFrame:ClearAllPoints()
PlayerFrame:SetPoint(“CENTER”, -250, -175)
PlayerFrame.SetPoint = function() end
TargetFrame:ClearAllPoints()
TargetFrame:SetPoint(“CENTER”, 250, -175)
TargetFrame.SetPoint = function() end
FocusFrame:ClearAllPoints()
FocusFrame:SetPoint(“CENTER”, 250, -300)
FocusFrame.SetPoint = function() end
WarlockPowerFrame:ClearAllPoints()
WarlockPowerFrame:SetPoint(“CENTER”, 250, 0)
WarlockPowerFrame.SetPoint = function() end
ComboPointPlayerFrame:ClearAllPoints()
ComboPointPlayerFrame:SetPoint(“CENTER”, 250, 0)
ComboPointPlayerFrame.SetPoint = function() end
PaladinPowerBarFrame:ClearAllPoints()
PaladinPowerBarFrame:SetPoint(“CENTER”, 250, 0)
PaladinPowerBarFrame.SetPoint = function() end
The second one
local a = CreateFrame(“Frame”)
a:SetScript(“OnEvent”, function(self, event)
if event == “PLAYER_ENTERING_WORLD” then
PlayerFrame:ClearAllPoints()
PlayerFrame:SetPoint(“CENTER”, -250, -175)
TargetFrame:ClearAllPoints()
TargetFrame:SetPoint(“CENTER”, 250, -175)
FocusFrame:ClearAllPoints()
FocusFrame:SetPoint(“CENTER”, 250, -300)
WarlockPowerFrame:ClearAllPoints()
WarlockPowerFrame:SetPoint(“CENTER”, 250, 0)
ComboPointPlayerFrame:ClearAllPoints()
ComboPointPlayerFrame:SetPoint(“CENTER”, 250, 0)
PaladinPowerBarFrame:ClearAllPoints()
PaladinPowerBarFrame:SetPoint(“CENTER”, 250, 0)
end
end)
a:RegisterEvent(“PLAYER_ENTERING_WORLD”)
They both work fine but with cons. Using the first one I get UI error message in chat window when I enter combat. While using the second one every time I port to another location all the positions reset to default and I got to /reload to put them back in. Does anyone know what is the issue?