PDA

View Full Version : Timer



Mega Link
01-26-2008, 11:40 PM
How do you make a script wait a set amount of time before continuing?

Gleeok
01-27-2008, 01:08 AM
Waitframes(f); ,were f is the amount of frames to wait.


where isn't mispelled, it's just a fool mune...gah, I give up.

Russ
01-27-2008, 01:20 AM
Also, waitframe only works in freeform combo scripts. If you use it in a global or item script, you will be sorry. However, for global scripts, there are work arounds. You can create a global variable, decrease it each frame, and have the script do something when the variable reaches zero.

pkmnfrk
01-27-2008, 02:30 AM
Also, waitframe only works in freeform combo scripts. If you use it in a global or item script, you will be sorry. However, for global scripts, there are work arounds. You can create a global variable, decrease it each frame, and have the script do something when the variable reaches zero.

Unlike what you just said, global scripts can wait as long as they want.

Mega Link
01-27-2008, 11:00 AM
Waitframes(f); ,were f is the amount of frames to wait.
How do you tell it to wait 20 seconds?

beefster09
01-27-2008, 11:06 AM
Each frame is 1/60 of a second, so you just multiply 20*60. So 1200 frames.

Joe123
01-28-2008, 03:53 AM
If you wait for 20 seconds, the rest of your script will stop running.

That's a rather large time period for your script to stop.