1.) How do I make a cooldown timer for a warrior skill? (like a bar timer)
2.) How would I put a countdown on it?
3.) Is it possible to make them all dif colors?
Thx in advance for any help you guys can give me, I'm new at this as you can probably tell.
You need to create a statusbar for the bar timer, a fontstring for the numbers, and use an OnUpdate script to have it and the numbers count down.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh
I've been messing around and here is what I've come up with for one of my timer bars:
Code:
function StatusBar1_OnEvent()
if (event == "PLAYER_CASTS_WHIRLWIND") then
FontString1:SetText("Whirlwind");
end
function StatusBar1_OnUpdate()
this:RegisterEvent("SPELL_UPDATE_COOLDOWN");
end
an OnUpdate script needs to be registered to a frame. Then, it only runs when that frame is shown, and not at all when the frame is hidden. Take a look at my mods Plink! or Frozen for examples. Also, read over wowwiki and I suggest getting a copy of the World of Warcraft Programming book. It's always a great help to me, and I referenced it when learning OnUpdate and statusbars recently.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh