#Dynamic anchoring to another Weak Aura

7 messages · Page 1 of 1 (latest)

glacial marsh
#

I want to dynamically change the Anchor of an Aura, it should be anchored to another aura.

How should I return the frame name ?

Here's what I've now, doesn't work obv.

function()
  local members = GetNumGroupMembers()
  if members <= 5 then
    return "WeakAuras:[Priest D - 5] Mana bar"
  end
  ...
end
humble sand
#

Easier to make separate Auras that show/hide in party/raid

glacial marsh
#

Not really easier to maintain a core which need to be duplicated for every content type or possible group size (0, 5, 20, 30, 40, arena, ...).

#

This is already why I have a - 5 manabar, because I've a - 20 manabar for 20 group size

#

But the core itself is always the same, this is why I want it to be anchored to -5 manabar or -20 manabar when group size change

#

I Already achieved it nicely for the raid mana bar, which change anchor to group shown by elvui.

function()
  local members = GetNumGroupMembers()
  if members <= 20 then
    return ElvUF_Raid1
  elseif members > 20 and members <= 30 then
    return ElvUF_Raid2
  elseif members > 30 then
    return ElvUF_Raid3
  end
end

This works perfectly.

But in case of another weak aura, I don't know how to reference it properly in the return statement.