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.
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.
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.