#Auras for Arena, Multi-Target and Smart Group?

17 messages · Page 1 of 1 (latest)

fast latch
#

I'm hoping someone can help me understand the Arena, Multi-Target and Smart Group usage a bit more clearly?

As an example - I currently have 3 individual weakauras to check player, party1, and party2 - if their health drops below 35% the icon shows to use power word life. Similarly I have another set of 3 individual weakauras to check arena1, arena2, and arena3 - if their health drops below 20% then it suggests shadow word death. The weakauras are working great, but it's time consuming to setup and maintain 3 separate icons per spell as opposed to smart grouping.

I assume that Arena and Smart Group will meet my needs but I'm unsure of how to use and access the information from these units. In an ideal scenario I'd love to have just 2 weakauras here - one for smart group for my party, and one for arena. If the triggers are true I'd like it to attach the icon to the arena/party frame and then have the text for the icon show the unit name that meets the triggers (arena1, party2, player, etc.).

I have lots of guesses on how to do this but hoping someone might be able to point me in the right direction? Genuinely appreciate any help or ideas!

barren coral
#

Yes a single Aura can do each of those.
A trigger with Smart Group will create a clone for each member of your group that matches the trigger's settings. So if you can party2 are below 35% health, you'll get a separate clone for each.

#

You anchor those clones to the unit frames in Display with [Anchor To = Unitframe]

#

Or you could use an empty Text Aura, and just use the clones to activate a glow on those unitframes with [Actions - On Show - Glow - unit frame] and [Actions - On Hide - Stop all glows]

fast latch
#

Awesome, thanks! I've got that working now. For Display text am I able to access the unitname for that clone? Would it be %1.unitname?

barren coral
#

The text replacements reflect the clone's info yes.
See the tooltip in Display for what text replacements are available.
Generally I never use %unitName but instead use %unit with "unit" formatting.

fast latch
#

Got it, that works perfectly too! Last Question I think - how do I use that in a variable for custom text?

I have custom text to %c and update custom text on Trigger Update. I've tried the below as the custom function but neither works. I'm guessing I'm using the unit variable incorrectly in this case?

function()
   if UnitIsUnit("%unit", "player") then
       return "Power Word: LIFE on PLAYER"
   end
end

function()
    if unit == "player" then
        return "Power Word: LIFE on PLAYER"
    end
end
barren coral
#

![help]

clever cragBOT
#

Click [help] on any expanded code block to get information specific to that block's usage, including any args sent in, and any expected returns.

barren coral
#

aura_env.states[triggerNum].unit

fast latch
#

![help]

clever cragBOT
#

Click [help] on any expanded code block to get information specific to that block's usage, including any args sent in, and any expected returns.

barren coral
#

It's advice for something to do in game

#

It'll let you get answers to this kind of thing in future for any other code block you use

fast latch
#

Very helpful! I have it all working now, definitely much easier to do this than the individual auras for each unit. Thanks again, I genuinely appreciate it!

fast latch
#

Actually, another Question just came up... Is there a way to handle sorting if it's in a dynamic group? For testing I currently have the trigger1 set to Health % <= 90 and display text as:

    if aura_env.states[1].unit == "player" then
        return "Power Word: LIFE on PLAYER"
    elseif aura_env.states[1].unit == "party1" then
        return "Power Word: LIFE on PARTY1"
    else
        return nil
    end
end

All is working great except the icons show in the order that they were originally shown, not in the order defined by that function (which makes sense because of the clones). I'm looking at the documentation for Custom Sort and I'm starting to understand how to sort an entire dynamic group but not sure of the possibility of sorting just the clones?

To try and illustrate further - this is what currently is happening:

Player takes damage and HP <= 90 - Icon is shown for Player in first slot
Party1 takes damage and HP <= 90 Health becomes <= 90 -Icon shown for Party1 in second slot```
```Scenario 2
Party1 takes damage and HP <= 90 first (Icon shown for Party1 in first slot)
Player takes damage and HP <= 90 second (Icon shown for Player in second slot)```


What I'd like to happen is to simply have the icon for Party1 always be shown as the priority. Would I have to write a custom function that would sort the entire group or is there a way to sort just the auras in a smart group?
barren coral
#

It would require a custom sort, yes