Change action by holding input (SOLVED)

So i have a character that can throw a punch in Paper2D. During that punch, he can’t move or do another action. After the punch is over he can move again, but if i want him to crouch, i have to press the Crouch Input again after he’s done punching. I want to be able to hold the Crouch key down as he’s punching, then have him transition back to crouch as soon as the animation is over if the Crouch key is still held down.

This works fine for walking and running, all i have to do is keep the key pressed and he’ll resume walking as soon as he can. I guess maybe it’s because it’s an axis value and not an action press, but i need this to be the case with Crouching as well.

Thanks

Is you have your animations set in the state machine, just add an additional transition from punch to crouch, and add a bool to indicate if the crouch key is pressed. So you’ll have two options: 1. punch animation over AND crouch released => go to run/walk animation; 2. punch animation over AND crouch pressed => go to crouch animation.

Hadn’t worked before, but i tried it again with a different setup and it works fine now. Thanks.