func _process(delta):
if Input. is_action_pressed("chop"):
time += delta
if time >= 3:
print("chop")
codelyok13 | 2022-03-19 00:59
This works and this is a very good way to do this. But my problem is, how to make the axe hitbox disappear almost instantly after appearing.
var time = 0
var axeHitbox = get_node("AxeHitbox")
func _process(delta):
if Input. is_action_pressed("chop"):
time += delta
if time >= 3:
AxeHitbox. disabled = false
Jan Gabriel | 2022-03-19 10:10
AxeHitbox.visible = false
and add
func _process(delta):
if Input. is_action_pressed("chop"):
time += delta
if time >= 3:
AxeHitbox. disabled = false
else: t = 0 // add