View Single Post
07-10-09, 04:46 PM   #9
MidgetMage55
Grinch!
 
MidgetMage55's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,498
Ahh so thats how you use the fetch bit. ill have to do that then and see how it goes.

As for registering the event in both panels i recall it being mentioned on the sample scripts page though i may have misread it. I just went to look abnd the page is throwing an error at the moment so ill edit later once i can access the page.

As far as putting the scripts in the panel with the higher number when ever i use the script to find a frame and get the numbers then do a /reloadui the numbers kept changing. Example being the 10 man panel listed as panel 1 initially then after reload it was panel 3. To be fair i havent updated kgpanels in forever since ive never had an issue so ill try that first.

Thanks again for the assist. Learning little by little hehe.

EDIT: Finally got the page of the sample scripts to load, this is a direct quote:

Adjusting Panels based on Raid or 5 Main party

In each Panel set the OnLoad script

self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PARTY_MEMBERS_CHANGED")
self:RegisterEvent("RAID_ROSTER_UPDATE")

Then in each Panel OnEvent script:

local pmems = GetNumPartyMembers()
local rmems = GetNumRaidMembers()
if (pmems < 1 and rmems < 1) or (pmems > 0 and pmems < 6 and rmems < 6) then
self:Hide()
else
self:Show()
end
Obviously there are slight differences in the actual script but the general idea is the same. you'll also note it does mention putting it in each panel. though i agree if i can do it in one panel (perhaps one that isnt going to be hidden at all if possible) makes it easier to fix later.
__________________

I think Hong Kong Phooey was a ninja AND a pirate. That was just too much awesome. - Yhor

Last edited by MidgetMage55 : 07-10-09 at 04:49 PM. Reason: update
  Reply With Quote