• 0

    posted a message on kgPanels Offical Thread
    Hello. I've been trying to search everywhere on the internet in the hope that someone could help me with a possibly easy script. I'm rather new in kg panels but i can comprehend commands quite easily.
    What im looking for is how can i enable to show a pannel when im in raid and ofcourse hide it when out of it.
    I have to say i have digged out this:
    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

    But it doesnt seem to work. If its related to Parenting how exactly i do that, and if its of any relevance the raid frames im using are X-perl ones.
    Much appreciate if anyone could help and sorry if this has been posted previously.
    Posted in: General AddOns
  • To post a comment, please or register a new account.