What I’m trying to accomplish is that when you press the button, the time decreases to zero unless the button is pressed again and it resets to 200 and it tries to go back to zero (cycle). Right now, it is stacking so if I press it once and then again after 50 it will go down by 350, and it speeds up as I keep hitting the button. My goal is to get it so if you press it once, if keeps going down until zero and if it is tapped again before zero, it will go back to two hundred and try to go to zero, not a negative number.
Thanks for your help in advance.
[lua]function circle:touch(e)
if(time_left > 0)then
time_left = 200
gametmr = timer.performWithDelay(100, countDown, 200)
end
end
circle:addEventListener(“touch”, circle)[lua] [import]uid: 86518 topic_id: 31762 reply_id: 331762[/import]
[import]uid: 86518 topic_id: 31762 reply_id: 126789[/import]