HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How can I use very short and rapid delays?

12-14-2004, 06:47 PM#1
Dalten
As some of you know, you can't get the game to accurately give you a delay of something like 0.01. It seems that any delay under 0.25 seconds gives a delay of 0.25 or so.

So, is there a work around for this? I have developed a complicated dialog system and I want the text to fill a window one letter at a time instead of all at once. Problem is, even if I say 0.01 delay, the letters seem to show up at the rate of about 5 per second or something hellishly slow like that.

Any suggestions?
12-14-2004, 07:04 PM#2
Voi
Use periodic events and start them from the main trigger.

Like
Code:
 Trigger 1:
Event - When something happens
Action - set an array variable to every character in the text
Action - set PeriodicCount = 1

Trigger 2: Event- every 0.05 seconds
Condition - If PeriodicCount is greater than 0
Action - Add the ArrayVariable[PeriodicCount] to the text
Action - set PeriodicCount = PeriodicCount + 1
Action - If ArrayVariable[PeriodicCount] equal to <empty string> then set PeriodicCount = 0
12-15-2004, 12:40 AM#3
Dalten
Very good, thanks a lot!