so i have a timer and it starts after 4 seconds
i have a oncollision function that sometimes will stop the timer before 4 seconds…
and that gives me an error because the timer isnt there to be stopped… so i was wondering how can i make this timer only stop if it has started… maybe something like this?
local function stopTimer() if stopTimer.status == "began" then timer.stop(theTimerWillBeHere) end end -- that is whats supposed to stop it.. ------------ stopTimer = timer.performWithDelay( 4000, updateScore, 1 ) -- this is the timer.. ------------ and this is what is in the onCollision function.. Runtimer:addEvevntListener("collsion", stopTimer)
this might not be perfect code because i wrote in in 30 seconds… but its a start…
Thanks for any help