#for Godot v3 How do I give a cooldown for pressing a button. (its mostly for a flying mechanic and w
2 messages · Page 1 of 1 (latest)
You could use a countdown timer that is initally set to 0. In the code where you are checking if the fly button is pressed add a check if the timer's time_left == 0. When you start them flying set the timer to how long you want the cooldown to be with start(cooldown).
https://docs.godotengine.org/en/3.5/classes/class_timer.html
Godot Engine documentation
Inherits: Node< Object A countdown timer. Description: Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. Note: Timers are affected by Engin...