GAS - How to double jump in a Ability?

Hi

How can I, through an ability, have my character double jump ?
or triple jump for that matter

I’ve tried using async tasks in the ability but they don’t work because they get canceled on the end_ability.
I’ve using GE but I don’t know how I can get a return from the effect saying if it worked or not, thus allowing or not the secondary jump

Thanks

You can use gameplay tags to do that.
Have your ability grant the ability system component a tag like “char.jump.first” if the character is performing a singular jump action. Then you can check whether the character has the “char.jump.first” tag to perform the double jump. At this point you can add a tag like “char.jump.exhausted” to the character and to the blocked tags to prevent further jumping. And you can set up when the character is no longer in Falling state to give you the tag like “char.jump.grounded” to give the ability to reactivate the jumping ability.

2 Likes

This will work great, don’t know why I didn’t think about this myself ha.