#dynamic custom tickmark placement on weapon swing timer bar

11 messages · Page 1 of 1 (latest)

glass dune
#

Hi -- i am trying to have a tick mark on my main hand weapon swing timer progress bar that shows me the relative timing of my off hand. I have two triggers, 1 is mainhand 2 is offhand. My thinking is that I could achieve this by calculating the difference (diff) between the two and placing the tick marker with an x offset from the right of my progress bar, see picture where i have it set to a static value. I am novice coder but here is my draft how I thought it could work, can someone help me please fill in the gaps? 😄 would be much appreciated.

function()
if aura_env.states and aura_env.states[2] and aura_env.states[1] and
aura_env.states[2].expirationTime and
aura_env.states[1].expirationTime then
diff = aura_env.states[1].expirationTime-aura_env.states[2].expirationTime
if diff<0 then
return false
else
*** put tickmark in progress bar with x-offset = diff anchored to the right end of the progress bar.***
end
else return true
end
end

wanton ingot
#

Did you try without code and just the options in the display tab, assuming it's default triggers?

glass dune
#

No I dont know how to feed the information from the triggers to the display tab, there is no 'custom' option of the tick placement. I am on classic anniversary

gritty basin
#

Why don't you create two bars. One for Main Hand and one for Off Hand. Add Spark to both with Interface\\Buttons\\WHITE8X8 and then make the bar colour for the Off Hand transparent & overlay them?

glass dune
#

because then they would move at different speeds (because they have different swing timers) within the fixed bar length. I want to see the position of the offhand relative to the main hand swing, but in absolute terms.

wanton ingot
#

I am not on my computer, you don't need custom.

#

You can select the progress source for the tickmark

glass dune
#

Okay thanks that is already helpful, I went with this:

#

and now it looks like this. I would prefer the white tick mark (the offhand) to be static relative to when the mainhand swing would conclude. i.e. as an offset from the right side of the bar

#

playing a little with it, I think that will do 🙂 thanks for the help!!

wanton ingot
#

You can try offset from something else.
I am currently not sure about the different options there