In the following code, we'll implement a UGameplayAbility derivative called UGameplayAbility_Attack for a Warrior class object. We'll attach this gameplay functionality to the input command string Ability1, which we'll activate on the left-mouse button-click:
- Open up your .Build.cs file (in our case, Chapter_11.Build.cs) and add the following dependencies:
using UnrealBuildTool;public class Chapter_11 : ModuleRules{ public Chapter_11(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); PublicDependencyModuleNames.AddRange(new string[] { "GameplayAbilities", "GameplayTags", "GameplayTasks" ...