How to disable abilities when another ability is active

Hello,

I have spent hours looking for how to disable an ability when another ability is active. In my case I dont want the player to be able to jump if the crouch ability is active (or even better make the player stand up). If I create a state of the UltimateCharacterLocomotion I cant access Abilities.

Another thing Ive tried is add 2 more abilities under "States" of UltimateCharacterLocomotion one named Crouch and the other Jump, then I make it so Jump is blocked by Crouch, but its not successful - Im not sure if this is the correct way to do things.

The obvious solution is to drag the crouch ability on top of jump, but I don't want to do that for other reasons.

EDIT: Right after I posted this I decided to try once again and added Crouch ability under Jump, which turns off Enabled of the Jump and it worked, now I can't jump while crouching.

Now, if it's possible I'd like to have the character stand up if we press space while crouching.
 
You can change the ability's Input Names within a state prefab, so you could just change them to include the "Jump" input name whilst the "Crouch" state is active.

This does seem to be a bit buggy though - from my tests having both the "Jump" and "Crouch" input names activated in a preset only allows the jump key to be used. I'll pass this on, if you need both keys to be usable then for now you may need to detect if the jump key is pressed whilst crouched and manually toggle the Crouch ability.
 
Ok, I think I will leave it like this for now.

On a separate note, I wanted to disable hip fire for a long time and make it a requirement to aim before shooting. I disabled the Item Use ability by default and only enable it when Aim is active. It works but maybe some weapons could hip fire, in that case, can we have "enable hipfire" on the shootable weapon script, so we can enable/disable based on the current weapon?
 
State presets can be blocked by other states, so yeah it should be pretty straightforward to have specific weapons block the state which disables Use.

This page has a section about blocking:
 
Top