-- Put your script here
-- Hide the panel so it's not shown until we want it to
eePanel29:Hide(); eePanel30:Hide()
-- Change our panel's visibility when in/out of a raid
function eePanels2:RaidPanelVisibility(self, event, ...)
-- If we're in a raid
if GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
-- Show the panel this script is attached to
eePanel29:Show(); eePanel30:Show()
-- If we're not in a raid
else
-- Hide the panel this script is attached to
eePanel29:Hide(); eePanel30:Hide()
end
end
-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
Trying to attach it to a panel. I'm trying to make it so that when im in a raid of 5 (because i show party if theres less) or more peeps it is shown and at all other times it isn't. It really isn't working.
EDIT: I obviously jacked this from the script thingy.
To be more clear. I only want the panel to show up when it is a raid bigger then 5 people (ie not a 5v5 arena).
1.) GetNumPartyMembers() > 4 is always false! (Because it return a value from 0 to 4)
2.) I think you should use GetNumRaidMembers() > 5. Is there a difference between a 5 man group and a 5 man raid? I think not.
So change:
if GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
to
if GetNumRaidMembers() > 5 then
Hope I helped you :/
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-- Hide the panel so it's not shown until we want it to
eePanel29:Hide(); eePanel30:Hide()
-- Change our panel's visibility when in/out of a raid
function eePanels2:RaidPanelVisibility(self, event, ...)
-- If we're in a raid
if GetNumPartyMembers() > 4 or GetNumRaidMembers() > 0 then
-- Show the panel this script is attached to
eePanel29:Show(); eePanel30:Show()
-- If we're not in a raid
else
-- Hide the panel this script is attached to
eePanel29:Hide(); eePanel30:Hide()
end
end
-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
Trying to attach it to a panel. I'm trying to make it so that when im in a raid of 5 (because i show party if theres less) or more peeps it is shown and at all other times it isn't. It really isn't working.
EDIT: I obviously jacked this from the script thingy.
To be more clear. I only want the panel to show up when it is a raid bigger then 5 people (ie not a 5v5 arena).
2.) I think you should use GetNumRaidMembers() > 5. Is there a difference between a 5 man group and a 5 man raid? I think not.
So change:
to
Hope I helped you :/