Welcome to the forums @"Beta byte "!
If you have a Timer node, you can just use something like this (untested, written entirely from memory):
func _input(event):
if (event is InputEventMouseButton):
if (event.pressed and event.button_index == BUTTON_LEFT):
$TimerNodeHere.start()
Or you can use a boolean to handle this instead. Something like this (untested):
var is_left_click_pressed = false
var timer = 0
const START_TIME = 1 # This number is the time in seconds
func _process(delta):
if (left_click_pressed):
left_click_pressed = false
if (timer <= 0):
timer = START_TIME
# do whatever you need when the timer starts here!
if (timer > 0):
timer -= delta
# do whatever you need to do when the timer is running here!
if (timer <= 0):
pass
# do whatever you need to do when the timer has finished here!
func _input(event):
if (event is InputEventMouseButton):
if (event.pressed and event.button_index == BUTTON_LEFT):
is_left_click_pressed = true