How to stop a character in the air?

I guess I missed the part where you said 2d game, but the blueprints would be close to the same. You can create a bool variable that you you enable when you want to disable them and add a branch in front of the action. I use this when I am in menus because many times I cannot completely disable game inputs. Just change the variable to one that applies to you.