#want to make a progress bar based on stacks

17 messages · Page 1 of 1 (latest)

wary parcel
#

Im trying to track my stacks of impending ruin in a progress texture but i seem to have hit a wall and dont know how to fix it. I want the wa to fill upwards as i gain stacks topping out at 10. https://wago.io/B2ehBHZKD this is what i have so far and currently it shows up as full at any amount of stacks and disappearing with no stacks. Ive attached the lua errors being thrown at me from bug sack but honestly dont know how to make heads or tails of it. thanks for any help

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

buoyant sun
#

#snippets

ruby zealot
#

The Duration Info function is very odd.
local _, _, _, stacks = WA_GetUnitAura("player", "Impending Ruin").count
• Stacks is the third, not fourth value
.count attempts to treat the result of the function call as a table, which is it not.
• You then just use the stacks var without checking if it's useful.

#

But don't fix this, just use the snippet along with a built in trigger.

wary parcel
#

that was actually pretty useful info so thank you, i know you said not to fix it but id rather know how to make my own stuff instead of just copying other peoples stuff. not familiar with lua so i wasnt sure how to get stack value out of unit aura function. working the way i want now so thanks 😄

ruby zealot
#

UNIT_AURA fires very frequently so your Aura will be expensive to run for something quite simple. This is the main reason why it's worth avoiding. I go pretty far out of my way to utilise built in triggers for de/buffs, even if what I want to do with the info is pretty far from standard.

wary parcel
#

#snippets message
is this what im looking for to make it less expensive? besides changing the the 20 to 10 how do i modify it to keep track of the right aura?

buoyant sun
#

it lives out of your trigger

#

your default aura trigger

wary parcel
#

ok i tried putting that in but now its not showing up again. does it matter for progress bar vs progress texture? also not sure where to put in the %c. this is what i have rn

buoyant sun
#

no

#

and why did you choose the one option labled as "Advanced"

#

In one of the texts use %c (in addition to anything else you're using if needed), set the custom option to on Trigger Update, then use the function:

wary parcel
#

yeah see idk what that means thats why im asking. i chose the option labeled as advanced because the text you pasted said to set the custom option to on trigger update which is what i thought that i was supposed to do. so is it supposed to be one or two triggers and where do i put the snippet?

buoyant sun
#

in a custom text

#

in the display tab

ruby zealot
#

You use a basic buff trigger to gather the info you're interested in.
In Display you add %c to a Text subelement. This will make a code block display. Paste the snippet in that