Jump to content

setTimer function not stable?


Vivalavido

Recommended Posts

Posted

Okay, im creating a bomb script, with the function setTimer(), but, its not stable at all, it sometimes activates it 4 times in a row

setTimer ( bombtehtower, 6000*10, 0 ) 

is what I use, it keeps itself to the time, but it activates it too much in a row sometimes, how to stablize it?

Posted
Required Arguments

theFunction: The function you wish the timer to call.

timeInterval: The number of milliseconds that should elapse before the function is called. 1000 milliseconds = 1 second.

timesToExecute: The number of times you want the timer to execute, or 0 for infinite repetitions.

3rd argument is how many times you want the function to be called, in your case it's 0 which means infinite times, just change that to 1 ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...