Originally Posted by Seerah
You need to wait until these frames are setup before you can hide anything. Try this:
Lua Code:
local f = CreateFrame("Frame") --we need a frame to listen for an event f:RegisterEvent("PLAYER_ENTERING_WORLD") --we'll listen for this event - all the UI stuff should be done loading by now f:SetScript("OnEvent", function(self, event) --when the event fires we want this to happen PlayerFrameTexture:Hide() PetFrameManaBar:Hide() end)
Put the above into your Lua file, or you can use this to make your addon instead: https://addon.bool.no/
|
that seems to work for the player frame but the pet mana bar is still there. could it be something different for register event?
iam also using the line
RegisterStateDriver(PetFrame,"visibility","[combat,@pet,exists] show;hide")
so that it hides when not in combat but when i use that line even if i type
/run PetFrameManaBar:Hide()
it does nothing unless i use it when the frame is visible so is there a way to get it to trigger after the frame is shown?
Edit:tried "PLAYER_ENTER_COMBAT" instead and nothing worked then