• 0

    posted a message on kgPanels Offical Thread
    Quote from Dysati
    Just noticed .. swap the self:Hide with self:Show, and vice versa!

    So 5-Man Party goes from:

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and pmems < 6 and rmems < 6) then
    [B]self:Hide()[/B]
    else
    [B]self:Show()[/B]
    end


    to:

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and pmems < 6 and rmems < 6) then
    [B]self:Show()[/B]
    else
    [B]self:Hide()[/B]
    end


    That should fix it.


    awsome ill check it out as soon as i get home .. thanks so much for your help :)

    Edit:Code worked .. thanks again!
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Quote from Dysati
    ---> Disclaimer: This is what I think you would do, but could be wrong as I'm new to kgPanels.
    ---> Advice from people who've used this AddOn more would be better to follow.


    Edit: Doing this the way you are might not be the best, as it might look a bit ugly when, for example, only you and another person are present in a 5-Man Party. You could try making a Panel for each frame of Grid and Parent them or summat, I dunno. Just a thought.

    Copy these into the OnLoad of each of the Panels:

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


    Then, enter these into the relevant OnEvent - So the 5-Man Party code goes into the OnEvent of the Panel you want to use for 5-Man Parties.

    5-Man Party

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and pmems < 6 and rmems < 6) then
    self:Hide()
    else
    self:Show()
    end


    10-Man Raid

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and rmems > 5 and rmems < 11) then
    self:Hide()
    else
    self:Show()
    end


    25-Man Raid

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and rmems > 11 and rmems < 26) then
    self:Hide()
    else
    self:Show()
    end


    40-Man Raid

    local pmems = GetNumPartyMembers()
    local rmems = GetNumRaidMembers()
    if (pmems > 0 and rmems > 26) then
    self:Hide()
    else
    self:Show()
    end


    Hope that works.

    Shamless PS: Anyone know how to change a Panel's OffSets through a Script? So like the equivalent of self:SetHeight(), but for the Y-OffSet? Thanks :)

    Regards,
    Dysati.


    thanks for the help ... i just tried it out maybe im entering them wrong but ya every single frame is showing up no matter what script is located in them :(
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    So im new to using Kgpanels and i guess new at scripting i was directed to this thread for some help.

    Im trying to get my grid to have like maybe 4 different panels (1 for 5man party; 1 for 10man raid; one for 25man raid; and 1 for 40man raid)

    The script they gave me was:

    OnLoad script:

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

    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

    now ive tried my best to adjust the numbers in there but i just cant figure out what each of them do and i just get really confused. If anyone is willing to help me out with scripting that i need That would be of great help :)
    Posted in: General AddOns
  • To post a comment, please or register a new account.