Enumerate and describe your game character's abilities. You will need to know what your character does in response to key events to code in this recipe.
There are several objects that we need to use here; they are as follows:
- The UGameplayAbility class—this is needed to derive the C++ class instances of the UGameplayAbility class, with one derivative class for each ability:
- Define what each ability does in .h and .cpp by overriding the available functions, such as UGameplayAbility::ActivateAbility, UGameplayAbility::InputPressed, UGameplayAbility::CheckCost, UGameplayAbility::ApplyCost, UGameplayAbility::ApplyCooldown, and so on
- GameplayAbilitiesSet is a DataAsset derivative object that contains a series of enum'd command values, and blueprints of the corresponding UGameplayAbility derivative classes that define the behavior for that particular input command. Each GameplayAbility is kicked off by a keystroke or mouse-click, which is set in DefaultInput.ini.