Skip to content

Combo Ability

The UCombatAbility_Combo ability is responsible for receiving combo events from the Trigger layer and handling them accordingly, by either managing the Combo Window or broadcasting the appropriate combo events to the Combo Manager Component.

This ability also requires the Combo Data Asset, UNinjaCombatComboSetupData, which contains the State Tree that manages Combo States, and the mappings of Input Actions to certain Combo Events.

This Ability also synchronizes with the Combo Manager, detecting when a Combo has ended, so the Ability can automatically end its own execution as well.

For an in-depth guide of the Combo System as a whole, visit the Combo System section.

Add all abilities from the combo

Make sure to grant the Combo Ability to your character and also all the Combat Abilities that are actually triggered by the combo!

Input Requirements

This ability has the following input requirements:

  1. An Input must trigger the ability as usual. It can use the Class, Tags or any other mechanism of your preference.
  2. Once the Ability is active, your Inputs must trigger a Gameplay Event identified by the tag Combat.Event.Combo.Attack.
  3. In this event, the first Optional Object must be the Input Action that triggered it. These Input Actions are also listed in the Combo Data Asset, mapped to their respective combo events.
Combo event payload

Make sure to always provide your Input Action as the Gameplay Event's first Optional Object! If that's not possible for you, then you can override the GetInputActionFromEvent function from this Ability and adjust it as needed.

Ninja Input integration

The Ninja Input has multiple Activate Gameplay Ability Handlers, for Class, Tags and Legacy Inputs. These can activate the ability and also send Gameplay Events for an Ability that is active. It works exactly as expected by this combo setup, including sending the Input Action in the Event's payload.

Ninja Input Integration

If you are using the Ninja Input plugin, this is what an Input Handler would look like for an Ability that manages a combo. In this case, we are extending from the Activate Ability by Tags Input Handler.

Combo Input Handler Activation

Then, for other inputs you can use the Send Gameplay Event Iput Handler.

Combo Input Handler Event