Combat Abilities
Before detailing each Combat Ability available in the system, let's discuss the core Abilities available and their properties, since you will find many of those present in the actual Combat Abilities, since they are part of the same hierarchy.
Here's quick summary of all Gameplay Abilities in the system. In the Navigation Menu, you will find a page with additional information for each Combat Ability. But first, let's continue in this page to discuss all the base abilities available in the system.
Base Combat Ability
The UNinjaCombatGameplayAbility
is the most basic Gameplay Ability in the system. All abilities extend from
it, direclty or indirectly. It has many useful methods available, exposed to both C++ and Blueprints. Here is
a summary of what you can expect from it:
- Multiple Functions retrieving the Combat Actor Components from the current Actor Info.
- Access to the Actor Info Proxy, configured in the Combat System's Settings.
- Support to create and listen to Gameplay Events, which are heavily used by the Combat System, across many abilities.
- Debug features that may be used by abilities, to provide logs to the developer.
Animation Montage Ability
The UNinjaCombatMontageAbility
is another abstract ability, extended by many abilities in the system.
The Combat System is designed to be Animation-centric, meaning that many events will trigger from certain points in an Animation Montage, via Gameplay Events, using the proper Animation Notifies or States.
The Montage Ability will provide two important features for that purpose: a Animation Montage Setup and a Motion Warping Setup. We'll discuss those just below, but before that, here are the specific properties available in this ability:
bPlayMontageWhenActivated
: Determines if the montage is played as soon as the ability starts. Setting this to false will require you to call thePlayAnimationMontage
function yourself, whenever appropriate.bMatchAnimationEnd
: Sets the ability to end when the Animation Montage ends.
Animation Montage Setup
Animation Montages are provided by a dedicated Object, the UNinjaCombatAnimationProvider
. Abilities will
instantiate this object for you and allow you to configure it during design-time (no programming).
This object's purpose is, like mentioned, to provide the Animation Montage and Section that should be used by the Ability. If no montage is provided, then Ability activation will be cancelled.
By default, the system provides the following animation providers:
Combat Animation Provider
: Default provider, directly sets an Animation Montage asset.Hit Reaction Animation Provider
: Evaluates hit impacts to retrieve the proper asset.
Motion Warping Setup
For a combat system, it's also expected that animation montages will "stick" to certain targets, especially if they are attacks or certain reactions.
To that end, the Animation Montage Ability also provides a section to configure the Motion Warping system. First, the following properties are available for this:
bEnableMotionWarping
: Enables the Motion Warping functionality for this ability.bWaitOnWarpTargetBeforePlayingAnimation
: Should the animation wait for a warp target before playing?WarpName
: Name of the warp that will work with the collected target. Important for the Motion Warp Notify.WarpOffset
: An optinal offset for the warp, may be positive or negative.
Then, the next step is to configure the Warp Target Provider, which is another dedicated Object, the
UNinjaCombatMotionWarpingTargetProvider
. It will collect a Warp Target and return to the Animation Ability,
via the ICombatTargetReceiverInterface
. This design is meant to accomodate asynchronous retrieval of targets.
By default, the system provides the following target providers:
Default Target Provider
: Default provider, retrieves the Combat Target from the avatar's Target Component.Targeting System Provider
: Uses the Gameplay Targeting System to find a target. The first result is used.