#aura_env.region.text is a nil value

20 messages · Page 1 of 1 (latest)

dreamy raptor
#

Hi,

I have this interrupt tracker WA (https://wago.io/o9iPZ-DPY). It is a progress bar with 3 text strings and the custom option to choose between a static text color or text in class color. Anyway... It does'nt work, instead it throws a lua error that aura_ev.region.text is a nil value.

It's from the custom color code in the animation tab:

`function()
if aura_env.state then
local config = aura_env.config["display"]

    local classColor = {aura_env.state.member.classColor:GetRGBA()}
    local barColor, nameColor, timerColor
    if config["colorBarUseClass"] then
        barColor = classColor
    else
        barColor = config["colorBar"]
    end
    if config["colorNameUseClass"] then
        nameColor = classColor
    else
        nameColor = config["colorName"]
    end
    if config["colorTimerUseClass"] then
        timerColor = classColor
    else
        timerColor = config["colorTimer"]
    end
    
    aura_env.region:Color(unpack(barColor))
    aura_env.region.text:SetTextColor(unpack(nameColor))
    aura_env.region.timer:SetTextColor(unpack(timerColor))
end

end`

Can anyone help here?

Wago.io is a database of sharable World of Warcraft addon elements

dusty knoll
#

It's super old.

bronze dagger
dreamy raptor
dusty knoll
#

Not with that code it wasn't

#

At least, it wasn't updated well

dreamy raptor
dreamy raptor
dusty knoll
#

It's pre-"subelements" code. That's several years at this point

dreamy raptor
#

is there anyway to get the text string out of the subRegion to use it in an if-condition?

like:

if aura_env.region.subRegions[i].text == "%n" then aura_env.region.subRegions[i]:Color(unpack(nameColor)) end

high beacon
#

Don't pull text out of a region. The data you're looking for is already available somewhere in the aura.

dreamy raptor
#

There are 6 custom options: "custom bar color", "class color bar", "custom name color", "class color name", "custom timer color" and "class color timer". Since aura_env.region.text and aura_env.region.timer is depricated its not possible to address the specific attribute directly, so i have to check all subRegions with type "subtext" if the text is "%n" or "%p". How else should I set the color for the specific texts?

high beacon
#

Well, the most default, and easiest way to colour a unit name text field would be to use the "Formats %unit" option.

#

any information that you can find in text replacements, like %n or %p, will be accessible via aura_env.state (or aura_env.states[X] in the case of multiple triggers) I just reread what you were asking and realized you were trying to determine which text subRegion is the correct one.

signal temple
dreamy raptor
#

i want to be able to manipulate the font color on the "custom options" tab.
if you change the color on "display" tab its been overwritten every single time you update the weakaura, this is shitty

dreamy raptor
signal temple
#

It definitely does, I ran like 15 keys last reset using it

dreamy raptor
#

how does it check the talent tree of your party members to check if they have talented into an interrupt or not? 😛

high beacon