I'm trying to do up a text aura in weakauras that will change color when I need to taunt off my cotank. I've got everything working about the aura except the color change. I dug up this old thread via google, but despite the function not throwing any errors, I can't figure out why it isn't changing color.
I have the main color set to white and the "animation" color set to red, with the following under "Custom Function":
local status = UnitThreatSituation("player", "target")
if status==0 then return r1,g1,b1,a1 else return r2,g2,b2,a2 end
The aura itself triggers when it checks my cotank for a tank-swap mechanic debuff (Static Burst is what I'm using to start). It displays a small line of text stating he has Static Burst, with a %c that displays "TAUNT!" if I'm in threat status 0 (not tanking + lower on aggro table). This part works fine, but I am using nearly-identical code to change the color, and it's not working. I'm sure I'm missing something simple and would appreciate any help.
For the sake of testing whether my code even works in the first place, I set up this one to tool around Vale of Eternal Blossoms taunting random unfortunate critters and beasts. If it works, it should always be either a red 3 or a white ?.
Thanks in advance.