Aim and Confirm a Spell with a GAS Target Actor
Let the player aim a blast with a ground marker, then confirm or cancel it. A Gameplay Ability System (GAS) Target Actor controls the preview and returns the selection. The cast ability applies damage when the player confirms.
Build the aiming marker
Create a Blueprint based on
NinjaCombatAbilityTargetingActor, Ninja Combat's subclass ofAGameplayAbilityTargetActor. Add a circle decal sized to match the blast radius.While aiming, trace from the player's camera along its forward direction on a channel the floor blocks. On a floor hit, move the targeting actor to the impact point so the circle and the blast share a center. If you update the trace on Tick, enable ticking on the Blueprint.
Set the actor's Targeting Type to Targeting Preset. Assign an area preset like the one in Cast a Shockwave with a Targeting Preset. On confirmation it collects actors around the marker and excludes the instigator.
In the marker Blueprint, use HandleTargetActorActivated and HandleTargetActorDeactivated to show and clear aiming visuals. Call the parent implementations to keep the built-in visibility and tick handling. If you already have a C++ subclass of AGameplayAbilityTargetActor, you can assign it directly. Its ConfirmTargetingAndContinue implementation should send the selected actors or their hit results through TargetDataReadyDelegate.
Wait for the player's choice
Create a
CombatAbility_CastBlueprint. Set Cast Trigger to Ability Activation, Targeting to Wait for Confirmation, and Confirmation Type to User Confirmed. Assign the marker as Targeting Actor Class and a damage effect based onCombatEffect_Damageas Cast Effect Class. Give the caster positive Base Damage.Assign a casting montage. Have its opening lead into a Loop section that repeats while aiming. Add a Confirmed section for the release. Set Commit Time to Targets Acquired if canceling should leave mana and cooldown available.
Grant the ability and bind your spell action to activate it. While aiming, send the player's confirm and cancel actions to the owning Ability System Component's
LocalInputConfirmandLocalInputCancel. If you use Ninja Input, see Combat and Input.

Place a Lingering Effect at the Marker
To place the frost field at the chosen point, switch the marker's Targeting Type to Location Only. On the ability, choose Wait for Confirmation and Spawn Actor and assign the frost field as Cast Actor Class. Confirmation now supplies the position. The field applies its own effect as combatants enter it.
Try It in Play
Aim the blast at one combatant with a second outside the circle. Both should keep their health while you aim. Confirm and check that only the first loses health. Cast again and cancel. The marker should clear, and neither combatant should take another hit.