# Abilities

<figure><img src="https://514197743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNZYB26cJYeWLpQVghvsJ%2Fuploads%2FJJQovRjWujh0cYdw70xh%2FOmegaAbility.png?alt=media&#x26;token=0788684d-e545-4e15-ad0f-7004d1a7f72f" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=eqQtSUTxRXA>" %}

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

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.&#x20;

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.&#x20;

* **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.
