Character BP Setup
The first step for adding a spell cast attack is to setup our blueprint events that are responsible of initiating and ending/canceling the attack.
Open you character BP, and call cast spell event ( This will show the spell marker and track your aim location). On the release of your input call Clear marker tracking event and the animation you would like to play.
![](https://media.wikiful.com/c2562104-9566-4ffd-884f-8411411e3372/e9af1b91-dfac-4217-9988-054144dba587/spell-300.png)
You can use “Cancel spell attack” anywhere that suitable to cancel the attack.
Under Hitbox Component detail panel, you can control the max distance of the attack, damage radius and the marker look and style.
Animation Setup
Add Hitbox Ranged Notify to your attack animation, set the properties on the notify details. If you would like to deal damage only once per character, make sure you set “One Time Damge” to true.
![](https://media.wikiful.com/c2562104-9566-4ffd-884f-8411411e3372/b974996a-966b-4d56-8bcf-5fff05520b6f/spe-300.png)
The “VFX Z offset” controls the Z location of the attack particle FX. 0 means the VFX will spawn at the ground.
Note: Spell trace is triggered for full length of the AnimNotify, Using “One time damage” variable you have the option to deal damage only once per character or not.