¿eh?
Out of context: Reply #15
- Started
- Last post
- 35 Responses
- rabattski0
that's going to be complex but doable.
well you can break any function. but a break really stops that function. if you restart that function it might not function like you want. unless it's dynamically build. e.g. you have a moving object which stops when you click somewhere and continues from the new position after 10 seconds.
like said before i would use a pause variable and depending on if it's true or false it continues to execute the script or not.
you can (re)set that variable either by user action or by a timed action.
it's smarter to build a function/listener who control this all. especially since you need more timed/pausable functions.
you also have to keep in mind, the more functions you have running, listeners working, the slower it gets (cpu wise). so a combo of listeners and dynamically oriented coding would be a way.
again it really depends on what you're trying to make.