Page 1 of 1

Delete Timer does not work?

PostPosted: Sun 7 Oct 2018, 15:19
by Umar
Did anyone noticed that the delete timer function dose not work? :?

Re: Delete Timer does not work?

PostPosted: Sun 7 Oct 2018, 16:42
by Lizard-13
Take into account that checking a timer value through conditions creates the timer again and start it, so if you do it:
Code: Select allConditions: The timer "MyTimer" is greater than 5 seconds
Actions: Do + 1 to variable "timers_created"
         Delete timer "MyTimer" from memory

It will add 1 to variable "timers_created" every 5 seconds, because after 5 seconds the timer is deleted, but the next frame the conditions check for a timer that doesn't exist and GD creates it again, 5 seconds after that it's deleted too and so on :)

Maybe this behavior should be changed? :shock: