Thread Tools Display Modes
07-24-08, 08:57 AM   #1
Liggy
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 8
Thumbs down How do I make...

Well I actually have several questions...

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.
  Reply With Quote
07-24-08, 11:56 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
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

  Reply With Quote
07-24-08, 06:16 PM   #3
Liggy
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 8
Thanks Seerah, so to have the timer activate after a skill would I use an OnEvent script?

Would it also be possible for someone to write me a sample OnUpdate script? Doesn't have to have the details just the basics.

Last edited by Liggy : 07-24-08 at 08:05 PM.
  Reply With Quote
07-24-08, 08:28 PM   #4
Liggy
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 8
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
  Reply With Quote
07-24-08, 09:16 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
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

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How do I make...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off