Help with Scripting - kgPanels
Hey all out there,
I think I need some help with scripting for the addon kgPanels... For my interface I want to set up kgPanels for in and out vehicle use. I want to show up a specific Panel if you're not in a vehicle, and another panel if you're in one. For now, the script I use... work... sometimes. That suck... Looks like this now: OnLoad (Panel 1 and 2): self:RegisterEvent ("UNIT_ENTERED_VEHICLE") self:RegisterEvent ("UNIT_EXITED_VEHICLE") OnEvent (Panel 1): if event == "UNIT_ENTERED_VEHICLE" then self:Hide() elseif event == "UNIT_EXITED_VEHICLE" then self:Show() end OnEvent (Panel 2): if event == "UNIT_ENTERED_VEHICLE" then self:Show() elseif event == "UNIT_EXITED_VEHICLE" then self:Hide() end Sometimes it's just inversed... Or just switch in mid fight in Battlegrounds (when someone else uses a vehicle?) I was thinking about something about "in" or "not in" vehilce instead of "entered" or "exited" or something that only counts for my self... Don't know, but I don't find anything related to that. Maybe you know something about that... :confused: |
Try this out:
Code:
--OnEvent (Panel 1): Lemme know if this works! |
Hey Waky...
I have tried that out what you've posted but doesn't work. Now it shows me up both panels when in and when out of vehicle :/ Edit: Ok works how it should! My fault, just forgot to add the OnLoad Script >.< Thanks /cheer |
Quote:
I'm glad it worked! |
All times are GMT -6. The time now is 06:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI