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 |
Add a self:Hide() to your OnLoad script.
|
Thanks, you put me on the right track, I had to put in "self:SetAlpha(0)" in the OnLoad script.
|
Ah, yes. Since you're merely changing the alpha and not actually hiding/showing the panel.
|
All times are GMT -6. The time now is 10:31 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI