KG Panels script help
Hey, I have a panel created in KG Panels that I would like to show on combat and hide when out of combat.
So far I have:
OnLoad: self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
OnEvent: if event == "PLAYER_REGEN_DISABLED" then
self:SetAlpha(1)
else
self:SetAlpha(0)
end
It works fine but when I first load in the panels are showing until I enter combat and then leave. Is there anyway to get these to automatically hide straight up and then show when i enter combat?
Thanks
|