detect when timer perfm delay started and finshed

how do i detect when timer perform delay started and finished?

thanks

event.count

count will be 1 when first time through.  count will equal your passed iteration when complete.

can i have full code?

Thanks

local counter=0 local lastTime=10 local function doWhateverYouWant() counter=counter+1 if counter==1 then print ("first time it runs") elseif counter==lastTime then print ("last time it will do timer.performWithDelay()") end print (counter) end timer.performWithDelay(100,doWhateverYouWant,lastTime)

thanks one more question would using nil kill timer perform delay since you carnt use remove function 

Thanks

sorry, didn’t understood the question, can you refrase it?

You cancel a time with timer.cancel.

See this page for all the details.

never mind how can you chnage the time of timer perofm delay by using math random since it only uses math random once then keeps using the same on

event.count

count will be 1 when first time through.  count will equal your passed iteration when complete.

can i have full code?

Thanks

local counter=0 local lastTime=10 local function doWhateverYouWant() counter=counter+1 if counter==1 then print ("first time it runs") elseif counter==lastTime then print ("last time it will do timer.performWithDelay()") end print (counter) end timer.performWithDelay(100,doWhateverYouWant,lastTime)

thanks one more question would using nil kill timer perform delay since you carnt use remove function 

Thanks

sorry, didn’t understood the question, can you refrase it?

You cancel a time with timer.cancel.

See this page for all the details.

never mind how can you chnage the time of timer perofm delay by using math random since it only uses math random once then keeps using the same on