Abilities

For a combatant to use an ability, it must first be granted to them. You can set the default granted abilities in the component.

To grant or grant abilities at runtime, simply call the relevant functions. NOTE: Only one instance of an ability can be granted to a combatant at a time.

When granted, abilities will be spawned onto their owning actor. To activate abilities, you have two options.

  • You can manually activate and stop an ability by calling it from the combatant component.

  • Alternatively, you can bind your ability to an Input. All Abilities have an Input Receiver Component that can handle activation. Under the "Input" tab you have parameters that can control how the input effects the ability. (Refer to UE's Enhanced Input Plugin for more details)

  • Activated on Started: Attempt to activate the ability when the Input is Started.

  • Activated on Triggered: Attempt to activate the ability when the Input is Triggered.

  • Finish input on Complete: Completes the ability (if active) when the Input is Completed.

  • Finish input on Cancel: Cancels the ability (if active) when the input is Cancelled.

When activated, the ability will run through your custom code until it is told to finished with a complete or cancel.

You can additionally prevent an ability from being activated depending on custom parameters.

Abilities can also have various tags that determine it's activation conditions.

  • Ability Tags: Tags on this ability (naturally)

  • Cancel Abilities: Cancels any active abilities with these tags.

  • Block Abilities: Prevents any abilities with these tags from being activated until this one is finished.

  • Required Owner Tags: Prevents this ability from activating unless the owning combatant has ALL of these tags.

  • Restricted Owner Tags: Prevents this ability from activating if the owning combatant has ANY of these tags.

Last updated