Enhanced Input - How to not trigger a Combo when action is on cooldown

Hello!

I’m a beginner trying to understand Blueprints.

I’m currently trying to make a combo action using the Enhanced Input System. It’s currently working fine, but some of the skills have a cooldown implemented with simple booleans. They still trigger when the button is pressed but do nothing if they are on cooldown. This means that they still count towards the combo because they are triggering. Is there a way to block triggering of an Input Action?

I tried a few solutions and nothing worked as I planned, but one thing still to be tested is creating a new trigger for the input actions that would have a cooldown as a condition to trigger (similar to having to tap, hold, press, etc). I just have no idea how to make a new trigger blueprint. Any information on this will be super valuable, or any other ideas too!

Thanks!

Hi @Luis_Mesquita

Try setting a boolean when you trigger your action say bWaitCooldown to true.

In your input event check this cooldown if its true do nothing if false allow action

Remember to reset the boolean to false when the cooldown is finished.

The actions that have a cooldown already work like that. The problem is that they still count towards the combo action even on cooldown, because the combo action registers the “triggered” event as soon as it happens (which means before the action checks if it’s on cooldown or not). Being able to block the triggering if the action is on cooldown would probably solve the issue but I don’t know how to.

Well not necessarily you can check the cooldown on the trigger so it only runs the code if the cooldown is over, check the boolean FIRST before any action code is ran. If its still coolingdown then run nothing otherwise run the action

I think there’s a small misunderstanding. What is ran after triggering is not important here. The problem is the triggering itself that is registered when you press the button. Currently I already have the cooldown implemented and it works (it checks the boolean and don’t run the code if it’s on cooldown). But I need a way to NOT trigger the action at all if it’s on cooldown so it doesn’t count towards the combo. I’m talking about the combo trigger from the enhanced input system. A combo is made by several other input actions, and they all register towards the combo action as soon as they trigger. For example:

Action 1: Punch (no cooldown)
Action 2: Kick (3 sec cooldown)
Combo Action: Punch + Punch + Kick

If I press quickly Punch + Punch + Kick the combo triggers if Kick is out of cooldown, but it also triggers if Kick is on cooldown, because Kick is triggered as soon as I press the button, thus registering towards the combo action, and only then it checks if the cooldown boolean is true or false. I need a way for “Kick” to NOT trigger when on cooldown, thus not triggering the combo action. I hope it’s more clear, and thanks for your input!

Ok you are misunderatanding me

Its is OK for your combo to register. It always will unless you block the input whichbgets messy.

Its how u execute your code after . If when u register a kick with a combo key event. You check if they are allowed to yet (using a cooldown bool) or not

What this does is prevent your actual code that performs the actual kick from happening. The check is the first thing you do when you detect your combo.

It really is that simple. Your combo triggers and event. The event checks the cooldown. Then if cooling down exit the code or do nothing, if not cooling down then perform the kick and set the cooldown bool and timer.

Wheh i get home later i will post a simple blueprint to show you

Hi Luis, Did you ever find a solution to this problem. Running into the same problem myself. The IMC is separate from your character blueprint so when using the built in combo system its not going to read the bool you have set up inside the character.