#Anchoring Dynamic Group buff icons active to respective Arena Frames (arena1, arena2, arena3)

14 messages · Page 1 of 1 (latest)

river sail
#

First Time Posting On This Discord

Hello everyone,

I'm currently working on developing a WeakAura that displays high-priority purgeable buffs im tracking on specific units in rated arena (The enemy player units are: arena1, arena2 & arena3). I want the weakaura to show an icon anchored to the corresponding arena frame (arena1, arena2, or arena3) when the buff is active on that unit.

For instance, if arena1 has the buff 'Power Infusion' active, I would like the WeakAura to display the icon & anchor it to its respective arena frame called "sArenaEnemyFrame1" . Similarly, if the buff is active on arena3, I want the icon to be shown & anchored to "sArenaEnemyFrame3."

To achieve this, I am currently using a the Group By Frame feature with a custom function. Here's the code I'm using:

    for _, regionData in ipairs(activeRegions) do
        local unit = regionData.region.state and regionData.region.state.unit
        if unit then
            local frame = UnitIsUnit(unit, "arena1") and sArenaEnemyFrame1 or UnitIsUnit(unit, "arena2") and sArenaEnemyFrame2 or UnitIsUnit(unit, "arena3") and sArenaEnemyFrame3
            if frame then
                frames[frame] = frames[frame] or {}
                tinsert(frames[frame], regionData)
            end
        end
    end
end```

In addition, I have my trigger set to unit-type Arena.

The issue I'm encountering is that the buff isn't showing up at all when it should be active inside the arena. I've double-checked the code, read through links like this (https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Dynamic-Group#group-by-frame), searched through this discord & have not found anyone trying to do this with arena frames.  My programming skills are quite poor & I'm unable to identify the problem. Could someone please assist me in resolving this issue?

Helpful side note: I have been successful with changing the local frame line of code to:
```local frame = UnitIsUnit(unit, "player") and sArenaEnemyFrame1```
In addition to setting my trigger unit type to player. It then displays & anchors the icon on the correct frame when the buff is applied. However, this is just for testing purposes and not how I intend to use it.

Thank you in advance for your help.
river sail
undone harness
#

You don't need any custom code to achieve this. Use the Arena unit in your trigger and Anchor to Unit Frames in display

cosmic walrus
#

Did you get this working Greymatter? I'm looking to do something with SArenaEnemyFrame1/2/3 also and need to place weak auras on them. I too could not find info

I originally wasn't going to do Dynamic groups I was trying to find how to do a custom anchor function to accomplish it

river sail
#

@undone harness @cosmic walrus I set trigger to Arena and changed group by frame to unit frames but this did not work. I tested with both blizzard UI arena frames & sArena frames.

cosmic walrus
#

the way I got mine to work, still working through some issues in my trigger logic was made 3 weak auras, one for each arena frame and set the anchor to sArenaEnemyFrame1/sArenaEnemyFrame2/sArenaEnemyFrame3 per weak aura

#

not how I'd like to do it

river sail
#

@cosmic walrus yes that’s how I originally made mine but I would like to make it one single proper weakaura that’s more optimized. It’s quite ugly to publish a weakaura for each arena unit to me.

#

I want to figure this out because I have multiple great WeakAura ideas that would utilize this type of anchoring but I don’t want to have a million weakauras I have to update individually. It becomes a nightmare that way.

cosmic walrus
#

Yeah I'd probably use it for more things also If I could figure it out

undone harness
#

The anchoring doesn't work with all unit frame addons. I also think it doesn't work with the default UI

lament wagon
cosmic walrus
#

I never had an issue with anything about frame 3 showing up if it was 2v2