What Is the Ability System
The ability system allows transitions between different gameplay abilities, enabling you to easily define and manage the behavior of players, NPCs, or any actors.
With this system, you can create complex interactions that adapt to various conditions without getting tangled up in the logic.
|
||
|
How to use
|
Abilities manager component
First, add the Abilities Manager component to your actor. 💡You can also create your own component by extending the Base Abilities Manager. |
Change Ability
Then you can change the actor's current ability like this, provided the ability is accessible. To override accessibility checks and force the ability change, enable Force Change. 💡Learn how to create an ability here. |
|
Useful dispatchers
Some dispatchers are availible in abilities manager component. |
Initial ability
In the component details, choose the default ability this actor will have.
|
Network replication
⚠️To replicate this system on a player pawn with inputs, the initial ability must be selected during possession to ensure the inputs are correctly activated within the ability. |
Ability
1 - Ability creation & Events
|
1.1 - Create an Ability
Right click in content browser, select Modular Abilities -> Ability. |
1.2 - Select ability class
Choose your base class for this ability. MA_Ability is the mother class of all abilities, so if you don't need inheritance between your capabilities, you should use it. 💡Only abilities with "bIsBaseAbilityClass" checked are listed. Learn more. |
|
1.3 - Class defaults
|
1.4 Is Accessible
You can override the IsAccessible function to implement your own accessibility logic. For example, for a sprint ability, you could use:
|
|
1.5 - Base events
|
1.6 - Ability change events
|
2 - Getters/Helpers
|
2.1 - Change Ability
Change Ability is the same as the Change Ability in the Abilities Manager Component. It automatically calls the Change Ability function of its manager. Learn more. |
2.2 - Getters
|
3 - Include Ability in Abilities Class Picker
|
In the Class Defaults of an ability, if "Is Base Ability Class" is checked, this ability will be included as a possible parent class for creating a new ability. |
Abilities Manager
|
Create an Abilies Manager
Right click in content browser, select Modular Abilities -> Abilities Manager. Getter
Returns the currently active ability. |
Events
|
K2Nodes Utilities
|
|||
|







.png)

.png)




.png)

.png)



.png)

.png)
.png)

Our Marketplace