kgPanels - Script Mouseover Combat
Hey guys,
First post here because I'm completely stuck trying to correctly script the following function in kgPanels. I have a kgPanel for my chat, and I want to hide the panel & chat frame when I enter combat, that part was easy, I just used the following instructions to hide/show the panel when entering/leaving combat. Code:
OnLoad I've tried adjusting the same Code:
if event == "PLAYER_REGEN_DISABLED" I dont want to hide the panel on mouseover outside of combat, can anyone help me fill in the gaps i'm missing to get this working? Thanks in advance for any help :D |
Hiding a panel is not the same as making it "invisible". When your panel is hidden, it's not there to mouse over. Think of hiding a panel as putting it away. Change its alpha instead.
|
Thank you for your help!
I have now adjusted the OnEvent to the following: Code:
if event == "PLAYER_REGEN_DISABLED" then Code:
if event == "PLAYER_REGEN_DISABLED" then Are my OnEnter/OnLeave statements incorrect? EDIT: I can get the mouseover to work regardless of combat status, I just want to know how to script it so that when I am out of combat the mousover is disabled Thanks again! |
There is no event return for mouseovers. You have to explicitly check to see if you are in combat using the InCombatLockdown function.
|
This has definitely put me in the right direction :D Thank you so much!
Still unable to find the exact string required for my desired result but this has been very helpful! I'm just not sure how to tie this to the OnEnter/OnLeave handles available in kgPanels. |
In your OnEnter:
Lua Code:
|
All times are GMT -6. The time now is 09:23 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI