#Get aura tooltip info for progress bar

12 messages · Page 1 of 1 (latest)

glad axle
#

I was looking to grab tooltip info to feed a progress bar to track Aspect of Harmony. The custom duration I'm using doesn't seem to work anymore. How could I change this to grab the tooltip info for first return value?

function()
local health = UnitHealthMax("player");
local name, icon, count, dispelType, duration, expirationTime, source, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, tooltip1 = WA_GetUnitBuff("player", "Aspect of Harmony" , "")
return tooltip1, health, 0, 0
end

vestal hawk
#

You want the progress bar to progress depending on the value from the tooltip?

glad axle
#

yeah,

vestal hawk
#

If yes, just track the aspect of harmony buff, tick "fetch tooltip info"
And in the display tab set the progress source of the bar to trigger1 -> tooltip1 (or tooltip2 or whatever if the value you want is the 2nd one in the tooltip)

#

You'll have to set a maximum progress manually though.

glad axle
#

Oh nice, I didn't know you could do that. But, I want the max value to be UnitHealthMax

vestal hawk
#

Then you'd need code

#

Make a new aura, progress bar.
Trigger: track your aspect of harmony, tick "fetch tooltip info"

In the display tab, make a custom text with %c
Enter this in the custom text code block:

  if aura_env.state and aura_env.state.tooltip1 then
    aura_env.region:SetDurationInfo(aura_env.state.tooltip1, UnitHealthMax("player"), true)
return aura_env.state.tooltip1
  end
end```
#

Make sure it's set to run on "trigger update" and not "every frame"

#

This will work if the value you're interested in is the first in the tooltip

#

If it's the second or third, replace any tooltip1 with tooltip2 or 3 etc.

#

(at this point you could also just make this as a TSU with static progress that watches the buff trigger, and adjusts the value and total accordingly. It's the better solution, but it's way more typing and I'm on mobile)