I wanted to make a simple player fighting mechanic, so i set a simple code
onready var sword_hitbox = $Hitbox_pivot/Hitbox
if Input.is_action_pressed("attack"):
$sworda.play("slash")
sword_hitbox.monitorable = true
else:
$sworda.play("idle")
sword_hitbox.monitorable = false
The problem is that when my "sword hitbox area" is already in the "enemy hurtbox area", the monitorable is still false even when i press attack. So i have to exit the "hurtbox area" and press the attack button, and enter the "hurtbox area" to let the "hurtbox" detect my sword hitbox area. and its annoying.
note: when i press attack button, the hitbox is set to monitorable so that it can be detected to let the enemy take damage
But i wanted let the "enemy hurtbox area to detect the "hitbox area" even when its already in the "hurbox area"