View Single Post
01-10-21, 11:51 PM   #7
Shabblahabbla
A Murloc Raider
Join Date: Jan 2021
Posts: 5
Originally Posted by Kanegasi View Post
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:
  1. local f=CreateFrame("frame")
  2. f:RegisterEvent("GROUP_ROSTER_UPDATE")
  3. f:SetScript("OnEvent",function()
  4.     if GetNumGroupMembers()>3 then
  5.         eBar_bar_4:SetAlpha(0)
  6.         eBar_bar_5:SetAlpha(0)
  7.         eBar_bar_6:SetAlpha(0)
  8.         eBar_bar_7:SetAlpha(0)
  9.         LoseControlparty1:SetAlpha(0)
  10.         LoseControlparty2:SetAlpha(0)
  11.     else
  12.         eBar_bar_4:SetAlpha(1)
  13.         eBar_bar_5:SetAlpha(1)
  14.         eBar_bar_6:SetAlpha(1)
  15.         eBar_bar_7:SetAlpha(1)
  16.         LoseControlparty1:SetAlpha(1)
  17.         LoseControlparty2:SetAlpha(1)
  18.     end
  19. 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?