- Edited
I'm trying to make simple melee attack system, that works like: Player Hits Button > Animation Plays > On certain Frame Hitbox of Attack is activated > Things Happens. But, when u press button, only first frame is playing. Here is code:
#Attack if Input.is_action_pressed("ui_attack"): $Sprite.play("Attack") if (($Sprite.get_frame()) == 2) && ($Sprite.current_animation == "Attack"): $AttackHitBox.disabled = false else: $AttackHitBox.disabled = true
Reason: idle Animation is trying to play, and don't let to play attack animation. (Thx to guy from Russian Godot community)