I am working on a 2D action platformer. When
is_action_just_pressed("attack"), my player enters
attack_state1. If the user presses the button again within a window, the player enters
attack_state2, and so on. This is how I achieve attack combos.
I am thinking about overloading the button so that, if held, the player enters
heavy_attack_state and performs a heavy attack.
My question concerns the best way to overload the button so that it can recognize when a heavy attack is being performed (when the button is held), but still feel responsive enough when quickly tapped to do the quick attacks?
I tried using
is_action_just_released() to trigger the quick attacks, but it doesn't feel good, especially since the player is likely to hold the button down when they press it for the final attack in a combo.
Any ideas about how to overload the button in a satisfying way?