Temp. Variable

Started by ktalebian, Sat 25/02/2006 03:32:20

Previous topic - Next topic

ktalebian

Hey, is there such thing as temp variable? So that after 10 seconds, for example, it expires, and once it does, something happens?

Gilbert

Check for SetTimer() from the manual.

ktalebian

Thanks, there is one tiny problem. And that is that IsTimerExpired is used to see whether the time has expired, but that will only load once! You know what I mean? I want the timer to be checked continously, so basically, I have a given amount of time to do something!

Gilbert

Why? Just put IsTimerExpired() in repeatedly_execute() event to make it check continuously. I think you may read more tutorials and the manual first and experience with the package before attempting something concrete.

ktalebian

Well, I am learning, as I go on! :D
btw, where can I find the list of all these functions? I went to that manual site (But the things are not in alphabatical order!), and my F1 does not work for some reasons!

For example, this repeated thing, how exatly is it used?

Gilbert

Check out the Scripting section.
You may also use the manual provided by the package instead, in which you can search, etc.

strazer

Gilbert, according to the manual:

"Note that this function will only return 1 once - after that, the timer is placed into an OFF state where it will always return 0 until restarted."

So ktalebian, put IsTimerExpired in the repeatedly_execute function and restart the timer there.

Gilbert

That's right, then what's the problem? He meant to check it continuously until it expires, right? From what I understand, was that he just wanted to do it once, not doing something continuously every set loops.

ktalebian

yeaah, it works noww, thxx to everyone!

SMF spam blocked by CleanTalk