Originally Posted by Kanegasi
I was curious what addon had those ebars, googling brought me to your unanswered reddit thread. Since you want to check if the group has 4 or more players, checking the number of members is better.
Lua Code:
local f=CreateFrame("frame") f:RegisterEvent("GROUP_ROSTER_UPDATE") f:SetScript("OnEvent",function() if GetNumGroupMembers()>3 then eBar_bar_4:SetAlpha(0) eBar_bar_5:SetAlpha(0) eBar_bar_6:SetAlpha(0) eBar_bar_7:SetAlpha(0) LoseControlparty1:SetAlpha(0) LoseControlparty2:SetAlpha(0) else eBar_bar_4:SetAlpha(1) eBar_bar_5:SetAlpha(1) eBar_bar_6:SetAlpha(1) eBar_bar_7:SetAlpha(1) LoseControlparty1:SetAlpha(1) LoseControlparty2:SetAlpha(1) end end
However, after looking for eBar and LoseControl and stumbling on what I believe is your thread in a certain other forum, I have a hunch this code won't work for you since the event GROUP_ROSTER_UPDATE was added in Battle for Azeroth and GetNumGroupMembers() was added in Mists of Pandaria.
|
Ye, I see what you are saying.
I wonder if there is another event or condition that I can try, maybe with your help?
How do I write all of this but instead of checking for a partyunit I just want these frames to always be hidden but shown when I enter arena.
I mean Arena for 2v2 or 3v3 and not in a BG.
How would that look like?