Thread: pausing a mod
View Single Post
03-31-07, 01:38 PM   #2
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
Originally Posted by Porrohman
is it possible to pause the output of a mod for say 5 seconds

I am trying to output multiple lines of text to the windows & I want to have enough time to read it before the next line overwrites it
You could:

(1) Go into a while loop, checking when 5 seconds have passed with time(), and then continue.

Pros: Very easy to do
Cons: Locks up the game for 5 seconds

(2) Use OnUpdate to calculate when 5 seconds have passed, and then continue by calling a function which does the rest of what you need to do.

Pros: Doesn't lock up the game; the "preferred" way to do it
Cons: Not the easiest thing to understand for newer programmers

http://www.wowwiki.com/HOWTO:_Use_OnUpdate_Correctly
  Reply With Quote