#Custom Progress Bar

1 messages · Page 1 of 1 (latest)

trail lintel
#

I was wondered if it is possible to set the current progress value of a progress bar through a custom trigger. the max progress value would be a static value of 200.
I was able to show the current value as a number in the display text with a custom display but whenever the progress goes up or down the text doesn't update and there is also no bar showing according to this value.
The print() show the value getting updated but no response on the text or the bar moving.

#

On Init:
aura_env.ballpower = 0
aura_env.maxballpower = 0

Event(s): UNIT_POWER_UPDATE
Custom Trigger:
function(e, unit)
-- Only check for power updates
if e == "UNIT_POWER_UPDATE" then
-- Get current player power
local power = UnitPower("player", 10)
local maxPower = UnitPowerMax("player", 10)

    -- Update our tracking variables
    aura_env.ballpower = power
    aura_env.maxballpower = maxPower
    
    -- Print for debugging
    print("Power updated: " .. power .. "/" .. maxPower)
    
    return true
end

return false

end

Custom Text:
function()
-- Always get fresh values directly
local power = UnitPower("player", 10)
local maxPower = UnitPowerMax("player", 10)
local name = UnitName("player")

-- Return formatted text
return string.format("%s: %d/%d", 
    WA_ClassColorName("player", name),
    power, 
maxPower)

end

harsh pelican
#

why use code? there is a fine power trigger already in the addon

trail lintel
#

It doesn't work.
What I'm after is for the Rolling Rubbish mechanic on Stix boss in the raid.
I want to track the affected players by the Aura and then get their alternate power progress on the garbage collection.
The moment one of them hits 200 which is the max value, the bar text goes from "PlayerName: 180/200" to "PlayerName: BOMB"
Then when all bombs are exploded it would say "PlayerName: BOSS"
I would make this progress bar in a dynamic group so there is an easy overview for the raid to see the progres of everyones ball and to see what they will be hitting.

harsh pelican
#

then there is the alternative power trigger, you can change the text with conditions

trail lintel
#

I tried before and it wasn't showing anything.
to just try it outside the raid I've been using the buff aura from the D.R.I.V.E 460013 in combination with the alternate power from the Turbo Meter to try it out

harsh pelican
#

there is also no need for checking the buff as they dont have an alternate power when not being on the bbomb

#

do not check for the buff.

trail lintel
#

The reason I want to also use the debuff that the players get is because in the raid you can also ride your car and then the bar would show up

harsh pelican
#

load it in the boss fight, which you should do anyway.

trail lintel
#

add the encounter id?

harsh pelican
#

yes. in the load tab

trail lintel
#

Ok that seems to work, but how would I then change the progress text 200/200 to either BOSS or BOMB depending how many bombs are still left?

harsh pelican
#

how did you plan to track it before

trail lintel
#

I have a different WA that currently show a bar to all raid members how many bombs are still up. This is also a custom

#

Custom Trigger:
function(s, e, ...)
if e == "UNIT_SPELLCAST_SUCCEEDED" then
local u, cast, spellID = ... -- Unit event
if spellID == 464399 then
local dur = (select(3, GetInstanceInfo()) == 16 and 22) or 26
s[""] = {
show = true,
changed = true,
progressType = "timed",
duration = dur,
expirationTime = dur + GetTime(),
count = WA_GetUnitBuff("boss1", 473227) and 2 or 1, -- confirm count in mythic
autoHide = true,
}
return true
end
elseif e == "CHAT_MSG_MONSTER_EMOTE" then
local text = ...
if s[""] and string.find(text, "Rolling Rubbish crashes into a Discarded Doomsplosive") then
if s[""].count <= 1 then
s[""].show = false
else
s[""].count = s[""].count-1
end
s[""].changed = true
return true
end
end
end

Custom Variables:
{
count = "number",
}

Then the conditions are this

trail lintel
#

So my idea was to add another variable bombAssignCounter.
This value would be the same as the bomb counter at init. and then whenever someone's alternate power reaches 200 instead of showing 200/200 alternate power in the progress bar the text would be set to BOMB or HIT BOMB and the bombAssignCounter would go down.
If the bombAssignCounter would be on 0 then we know all the other people that then reach 200/200 can roll into the boss and those texts would be set to BOSS or HIT BOSS

zinc bramble
#

so one trigger tracks alternate power
and the other one tracks bomb counts

Then conditions can do the remaining stuff for you

trail lintel
#

How would this prevent from telling 3-4 people to hit a bomb if the bomb counter is 2 and 4 people have 200/200 power?
You need to make it a custom to do this correct, no?

thorn olive
#

You want your WA to talk to other people with the WA? This is kind of why Blizz is not happy with the WA addon 😦