![]() |
Random Selection question
Hey guys, I have another question. Along with the timer question I had earlier, I added a function when the timer runs out for a random selection. It's for a Chance-type event I'm trying to make. I get it to select randomly, but the trouble I am having, is getting the TimeOut loop to stop. How would I go about this?
Here is what I have so far: PHP Code:
|
Not sure exactly what you're trying to do, but you can abuse return; to end a function. As long as the setTimer doesn't get called, it will stop repeatedly calling the onTimeOut function.
|
by using setTimer(0); you can cancel the onTimeout event from happening :)
The onTimeout event will only loop if you set a new timer for it inside the onTimeout function code snippet as well. |
So would I use a scheduleevent to call a function that would set the Timer to 0?
|
I'm trying to loop it a few times, so it kinda names of a few random numbers before selecting a box. It's basically just a visual for the players of the event. Similar to UN's. Not sure if you guys have seen it?
|
PHP Code:
|
If you want to do something similar to UNs...
From whatever other function. PHP Code:
PHP Code:
|
Quote:
Quote:
|
| All times are GMT +2. The time now is 04:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.