0 votes

Hi..

I have a function that is run in _process() and I wanna time it so that after couple of seconds it stops running..
I made it so that if a certain bool is true the function runs, now I want the timer to be triggered when that bool is true also and want it to turn it false after couple of seconds, the problem is that my timer never time-out it get triggered every frame and I don't know how to deal with this

asked Dec 14, 2019 in Engine by Abdulelah444 (19 points)

1 Answer

0 votes

Sounds like you have to trigger the timer not when the certain bool ist true, but only when it's going from false to true. So you have to remember the old state in a variable.

answered Dec 14, 2019 by Maxpilot (59 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.