# Leave a Frost Field That Applies an Effect on Contact

> For the complete documentation index, see [llms.txt](llms.txt).

Give a caster a frost field they can leave behind. A combatant that enters the field gains a `Status.Frosted` gameplay tag. Leaving the field clears the tag. The cast actor handles entry and exit, so the spell can keep working after the caster finishes the animation.

Procedure: Build the field and its effect

1. Register `Status.Frosted` in your project's gameplay tags. Create a Gameplay Effect with an Infinite duration and grant that tag to the target while the effect is active.

2. Create a Blueprint based on `NinjaCombatCastActor_Sphere`. In its class defaults, set Cast Effect Class to the frost effect. On the root sphere, set a radius of 300, enable query collision and Generate Overlap Events, and set the response to the target's collision object type to Overlap. Enable overlap events on the target's collision component too.

3. On the Cast Behavior component, open the existing Cast Effect behavior. Enable Manage Effect Removal so the infinite effect ends on exit. Keep Should Ignore Source enabled. Turn off Reinforce Hit Results so touching the sphere is enough to gain the tag.

4. In Floor Alignment, choose a Floor Trace Channel that your floor blocks and the caster ignores. In the Dissipation behavior, enable Auto Dissipate and set Active Duration to five seconds. Add a visible ring or particle effect matching the sphere so the player can see where to step.

To let frost-resistant characters walk through safely, make a child of `NinjaCombatCastEffectBehavior` and use it in place of the field's default effect behavior. Override `PassesCastFilter` in Blueprint, or `PassesCastFilter_Implementation` in C++, and return false for targets with your resistance tag. The built-in behavior still handles application and removal.

Procedure: Let the caster leave the field behind

1. Create a `CombatAbility_Cast` Blueprint. Choose Ability Activation for Cast Trigger and Spawn Actor for Targeting. Set Cast Actor Class to the frost field. The actor owns the frost effect.

2. Assign a short casting montage, grant the ability, and activate it on your character. The default spawn location is the caster's position. Walk away as the animation finishes.

## Try It in Play

Move a second combatant into the field after the caster walks away. Watch its owned tags in the Gameplay Debugger. `Status.Frosted` should appear on entry and disappear on exit. Enter again and stay until the field expires. The tag should clear then too.

