I don’t think there’s a direct way to store key presses up for later. If there is, I’d be glad to learn about it.
There a couple of ways to work around that, though.
The first idea that jumps to mind is to “convert” a key press into something more easible storable (like an enum value) and push it into an array of “queued” commands if a command cannot be executed right away. Then when the current action ends, you could get and remove the first element of the array (if it’s non-empty) and, depending on its value (for example using a Switch node), trigger the function the command would have triggered if it had been possible at the time.
If you only have a few highly specific situations where a given action might not be possible at the time but needs to happen later, you could also use Gate nodes. In response to the key press, add a Branch. If the action is possible right now, do that. Otherwise if the action will be possible later, open a Gate. When the current action preventing the execution of the command ends, attempt to enter the Gate. This will only execute if the player had pressed the other key earlier. After triggering the action, make sure to close the gate again. You can also close the Gate if the player does something else in the meantime invalidating the second key press.
For combo moves, you could also check out Animation Montages. Use Branch Points to handle switching between different animations and Anim Notifies to trigger specific effects depending on which animation is playing (like different amount of damage dealt, stunning the target or knocking the opponent a specified distance).
These are just some ideas off the top of my head. Which one works best really depends on the circumstances of your game. You might end up using a combination of all three or come up with something entirely different.
When I press jump button - he jumps - turns on the bool Character is in air - When landed that bool is turned off
When Pressing crouch - “if character is in the air” - if it’s not in the air - then I can crouch…
The problem is that If I do press the crouch button while the character is in the air - and hold it down…when he lands…he doesn’t crouch…because at the time of the button press - the bool was that he was in the air
And when he does jump - my character put’s his legs in the air and since it’s not root motion - the root capsule lands 1st and then his legs come down…- but that’s a whole other problem I’m trying to solve
When I press jump button - he jumps - turns on the bool Character is in air - When landed that bool is turned off
When Pressing crouch - “if character is in the air” - if it’s not in the air - then I can crouch…
The problem is that If I do press the crouch button while the character is in the air - and hold it down…when he lands…he doesn’t crouch…because at the time of the button press - the bool was that he was in the air
And when he does jump - my character put’s his legs in the air and since it’s not root motion - the root capsule lands 1st and then his legs come down…- but that’s a whole other problem I’m trying to solve