#Display only one text element for all TSU clones?

15 messages · Page 1 of 1 (latest)

paper hornet
#

Hey. Is there a way to have a text or bar aura using TSU only show one text area in total, instead of one pr. clone?
I'm trying to get a WA to track and show the amount of imps i have summoned, but it ends up showing the text for each clone, which often briefly means several numbers ontop of each other.
Currently i've made a function in aura_env which takes the allstates table as argument, and then i call that at the end of of the trigger:

    local imps = 0
    for k, state in pairs(states) do
        if state.demon == "Imp" then
            imps = imps + 1
        end
    end
    aura_env.ActiveImps = imps
end```
and then my text area shows `aura_env.ActiveImps`, but as you can see the screenshot, it doesn't look very elegant 😄
fossil kraken
#

You need to remember that when you're using a TSU you're in control of all this stuff.
Create a specific state on which you have this value and don't put it on the rest.

#

Throwing stuff into aura_env like that, and displaying it with custom text are just bad workarounds that exacerbate the issue. Handle everything inside the trigger

paper hornet
#

Do you know of any WA's that does this i can look at as an example? If not, i'll just play around a bit. It would just be nice to see an example of it done properly 😄

paper hornet
#

Ok, i've changed the above function to return the number of imps and gone away from aura_env, and added the following at the end of the trigger:

    a["total"] = {
        show = true,
        changed = true,
        imps = imps,
        progressType = "static",
        value = 0,
        total = 0,
        spark = false,
        sparkColor = {1.0, 1.0, 1.0, 0.0}
    }```
Downside is it's now showing a spark for this state at all times. Am i disabling the spark incorrectly?
I would expect that's how you disable it based on 
https://github.com/WeakAuras/WeakAuras2/blob/main/WeakAuras/RegionTypes/AuraBar.lua#L23
GitHub

World of Warcraft addon that provides a powerful framework to display customizable graphics on your screen. - WeakAuras2/WeakAuras/RegionTypes/AuraBar.lua at main · WeakAuras/WeakAuras2

obtuse sequoia
#

isn't spark the thing that you change inside the Display tab ?

#

never seen that inside allstates table

paper hornet
#

Yeah it is, i just thought it would be set on every clone, as it's currently showing 3 sparks if i have 3 imps. But it's also showing one all the way in the bottom for the "total" now

obtuse sequoia
#

You just want to disable sparks completely for that bar ?

paper hornet
#

I want it showing for the clones that are actually imps so i can see how long is left on each imp, but i want it hidden for the "total" currently counting the number of imps. I think i've found a solution though.
I've set the spark to "Hide on: Empty" since the value for "total" is set to 0. That seems to have fixed it and hidden the one all the way to the left:

obtuse sequoia
#

ah i see

fossil kraken
#

There's a setting in Spark settings to hide at full and empty

paper hornet
#

Yeah, that's what i ended up setting. Seems to work now. I'll play around a bit and see if i can get a better understanding of what is available for the state and what isn't. Thanks so far though! 🙂