Well, I guess you could have a bool “can_fire” which is set to false when the button is pressed and set to true when the timer expires. Use this bool to then determine whether the pressing of the fire button results in any action.
yes i tried it too but it did not work for me i dont know why
RockyXDeadman | 2020-11-12 16:22
How about this?
func _on_fire_button_pressed():
if (can_fire):
can_fire = false
$Timer_1.start()
print("Firing")
else:
print("Can't fire yet")
func _on_Timer_1_timeout():
can_fire = true
Splunk | 2020-11-12 16:41
Or even this to effectively disable the button (get the button mask in the ready function and set it back accordingly):