Cast Ability
The UCombatAbility_Cast
ability is responsible for common combat behaviors that are cast on self or others, such as:
- Buffs applied to the Avatar or to other Actors.
- Area of Damage Effects, applied to multiple targets collected via the Gameplay Targeting System.
As usual, this is an animation-based ability and will wait for the Gameplay Event identified by the Combat.Event.Cast
Gameplay Tag. For that, you can use the Cast Animation Notify.
Effects applied to the Avatar
Enabled via the bAppliesToSelf
flag, allows you to apply an effect to the Avatar, defined by the SelfEffectClass
property.
Effects applied to Targets
Enabled via the bAppliesToTargets
flag, allows you to apply an effect to targets collected using either the Targeting System
or an Actor spawned by the Ability, defined by the CombatCastInterface
. Any target collected will receive the Gameplay Effect
defined by the TargetEffectClass
property.
Targeting System
If you choose the Targeting System to collect targets, then a Targeting Preset must be provided. All targets obtained by the preset will receive the Gameplay Effect configured in the Ability.
Spawning a Cast Actor
If you choose to spawn a Cast Actor, then this Actor is responsible for collecting targets and applying the Gameplay Effect,
in which case, it will be assigned to the Cast Actor via the SetTargetEffectHandle
function, defined by the CombatCastInterface
.
Any Actor implementing the Interface can be used, but you can use the base Actor already provided, ANinjaCombatCastActor` as a starting point. Either way, it's the actor's responsibility to destroy itself whenever appropriate.