View Single Post
08-06-18, 01:02 PM   #3
joeyo
An Aku'mai Servant
Join Date: Jan 2012
Posts: 31
Originally Posted by Seerah View Post
You need to wait until these frames are setup before you can hide anything. Try this:
Lua Code:
  1. local f = CreateFrame("Frame")    --we need a frame to listen for an event
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")   --we'll listen for this event - all the UI stuff should be done loading by now
  3. f:SetScript("OnEvent", function(self, event)   --when the event fires we want this to happen
  4.      PlayerFrameTexture:Hide()
  5.      PetFrameManaBar:Hide()
  6. 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

Last edited by joeyo : 08-06-18 at 04:56 PM.
  Reply With Quote