Ninja Bear Studio Plugins Help

Building Cast Flows

This guide shows how to build common Cast Flows using the Cast Ability, Targeting Presets, Ability Targeting Actors, and Cast Actors.

For a deeper explanation of the systems and settings used by these examples, see the related concepts.

Prerequisites

Player Vitals Widget

Before following this guide, consider setting up your combat UI so you can track resource changes, such as mana costs and regeneration delays, while testing the examples. Alternatively, you can use the Gameplay Debugger for this purpose.

Input Handling

Make sure your input setup can activate the ability and confirm or cancel targeting for interactive Cast Flows. For more information, see Combat and Input Integration.

Integration with Ninja Input is optional, but input handling for ability activation should already be configured.

Gameplay Targeting System

Use this approach when the ability can rely on a Targeting Preset to find and filter valid targets. This is the most direct Cast Ability setup: the preset collects the targets, then the ability applies its configured Gameplay Effect to the results.

Create the Targeting Preset

Targeting Preset
  1. In your Targeting data folder, create a new Data Asset using TargetingPreset as the base class.

  2. Add Targeting Selection Task AOE to the list of Tasks.

  3. Configure the AOE task with the following values:

    • Shape Type: Sphere

    • Collision Channel: CombatObject

    • Ignore Source Actor: enabled

    • Ignore Instigator Actor: enabled

    • Radius: 600

  4. Add Targeting Filter Task Dead to the list of Tasks.

Create the Damage Gameplay Effect

Damage Gameplay Effect
  1. In your Cast Ability folder, create a new Gameplay Effect Blueprint using CombatEffect_Damage as the base class.

  2. Add Combat.Effect.Damage.Unblockable to Tags This Effect Has.

  3. Add a Calculation Modifier for the Calculation Class. Select Damage Multiplier Backing Data and set Scalable Float Magnitude to 2.0.

  4. Optionally, add a Gameplay Cue that should be applied to each target affected by the cast.

Create the Success Gameplay Effect

Success Gameplay Effect
  1. In your Cast Ability folder, create a new Gameplay Effect Blueprint using GameplayEffect as the base class.

  2. Add a Gameplay Cue that should be applied to the instigator when the cast succeeds.

Create the Cost Gameplay Effect

Cost Gameplay Effect
  1. In your Cast Ability folder, create a new Gameplay Effect Blueprint using GameplayEffect as the base class.

  2. Add an Apply Additional Effects component and add CombatEffect_CancelManaRegeneration.

    This briefly interrupts mana regeneration, based on the ManaRegenDelay attribute, after the mana cost is applied.

  3. Add a new Modifier and set the Mana Gameplay Attribute.

  4. Set Calculation Type to Attribute Based. Set Coefficient to -1.0 and set ManaCost as the Attribute to Capture.

    You can adjust this further by changing the multiplier or connecting the value to a curve.

Create the Animation Montage

Cast Animation Montage (with Notify)
  1. Select the Animation Sequence that represents the Cast Ability and create an Animation Montage from it.

  2. If applicable, select the correct Slot for the Animation Montage, based on the setup in your Animation Instance.

  3. Navigate to the point in the Animation Montage where the cast should trigger, then add the Trigger Cast Animation Notify.

Create the Cast Ability

Cast Ability (Targeting Preset)
  1. Create a new Gameplay Ability using CombatAbility_Cast as the base class, and name it GA_Cast_TargetingPreset.

  2. Configure the Cast Ability with the following values:

    • Cast Trigger: Gameplay Event

    • Targeting: Targeting System

    • Commit Time: Ability Activates

    • Cast Effect Class: Gameplay Effect created for the cast outcome

    • Targeting Preset: Targeting Preset created to select targets

    • Default Animation Montage: Animation Montage with the Trigger Cast Notify

  3. Add any Gameplay Tags required to activate the ability.

  4. Set Cost Effect Class to the Cost Gameplay Effect created for this ability.

Ability Targeting Actor

Use this approach when the ability needs to collect targets through the Gameplay Ability System's Targeting Actors. This supports the target actor types provided by GAS, including custom subclasses, making it useful for abilities that already fit the standard GAS targeting flow.

Create the Looping Animation Montage

Cast Animation Montage (looping)
  1. Select the Animation Sequence that represents the Cast Ability and create an Animation Montage from it.

  2. If applicable, select the correct Slot for the Animation Montage, based on the setup in your Animation Instance.

  3. Create a Loop section at the point where the ability should wait for target confirmation.

  4. Create a Confirmed section at the point where the animation should continue after the cast is confirmed.

  5. Configure the montage section transitions so Default transitions into Loop.

  6. Configure the Loop section to transition into itself, so the animation keeps playing while the ability waits for confirmation.

  7. Configure the Confirmed section as the section played after confirmation.

Create the Ability Targeting Actor

  1. Create a new Ability Targeting Actor using ANinjaCombatAbilityTargetingActor as the base class.

  2. Configure any visuals needed by the targeting actor, such as decals, meshes, particle effects, or other placement indicators.

  3. Set Targeting Type to Targeting Preset.

  4. Set Targeting Preset to the Targeting Preset created earlier in this guide.

Create the Cast Ability

Cast Ability (Confirm Targets)
  1. Duplicate the Cast Ability created in the Gameplay Targeting System section, GA_Cast_TargetingPreset, and name the new ability GA_Cast_Confirm.

  2. Configure the Cast Ability with the following values:

    • Cast Trigger: Ability Activation

    • Targeting: Wait for Confirmation

    • Commit Time: Targets Acquired

    • Confirmation Type: User Confirmed

    • Targeting Actor Class: the Ability Targeting Actor created in the previous procedure

    • Default Animation Montage: the Animation Montage with the Loop and Confirmed sections

Cast Actor

Use this approach when the ability should spawn a dedicated Cast Actor into the world. The Cast Actor is responsible for collecting targets, usually through collision or overlap logic, and applying the Gameplay Effect set in the ability.

Create the Cast Actor

  1. In your Blueprints folder, create a new Cast Actor Blueprint using NinjaCombatCastActor_Sphere as the base class.

  2. Review the default Cast Behaviors and adjust settings as needed:

    • In the Floor Alignment behavior, set the Floor Trace Channel to Floor

    • In the Cast Effect behavior, set the Hit Result Channel to CombatObject

    • In the Dissipation behavior, adjust the Active Duration as needed.

  3. Add a Niagara Component and an Audio Component to the Root Sphere. Set Auto Activate to false on both components.

  4. In the My Blueprint tab, expand Overridable Functions and select StartCast. This adds the event to the Event Graph.

  5. Cast Actor Graph

    Right-click the StartCast node and select Add Call to Parent Function. Connect the parent function call to the event.

    • Bind a new event to the Niagara Component's System Finished delegate.

    • Activate the VFX and Audio components. Make sure both components are set to Reset, then call Play on the audio component.

    • In the System Finished event, unbind the callback and deactivate the Poolable Actor through the Poolable Actor Component.

  6. Close the base Blueprint and create a new Child Blueprint. This child Blueprint is the one that will be used by the ability.

  7. Assign the Niagara System and Sound assets that should be used by this Cast Actor.

  8. Set the Gameplay Effect applied by the Cast Actor, to the Cast Effect Class.

Create the Cast Ability

Cast Ability (Actor)
  1. Duplicate the Cast Ability created in the Gameplay Targeting System section, GA_Cast_TargetingPreset, and name the new ability GA_Cast_CastActor.

  2. Set Targeting to Cast Actor.

  3. Set Cast Actor Class to the Cast Actor created in the previous procedure.

  4. Make sure Successful Cast Effect Class is set to the Success Gameplay Effect created earlier in this guide.

    This is the same Gameplay Effect created for the GA_Cast_TargetingPreset, so no changes should be needed here.

Targeted Cast Actor

Use this approach when the ability needs a targeting step before spawning the Cast Actor. The Ability Targeting Actor selects where the cast should happen, then the ability spawns a Cast Actor at that location to collect targets and apply the configured Gameplay Effect.

Create the Ability Targeting Actor

  1. Create a new Child Blueprint using the Ability Targeting Actor created in the previous section as the parent class.

  2. Set Targeting Type to Targeting Preset.

  3. Set Targeting Preset to the Targeting Preset created earlier in this guide.

Create the Cast Ability

Cast Ability (Confirm Cast)
  1. Duplicate the Cast Ability created in the Ability Targeting Actor section, GA_Cast_Confirm, and name the new ability GA_Cast_SelectLocation.

  2. Set Targeting to Wait for Confirmation and Spawn Actor.

  3. Set Targeting Actor Class to the Ability Targeting Actor created in the previous procedure.

  4. Set Cast Actor Class to the Cast Actor created earlier in this guide.

29 May 2026