Hi, I have an AI setup that casts a fireball spell. Before casting it, it plays an animation quite long (3 seconds). I noticed that if I hit the AI during the animation, the animation stops but the projectile spawns anyways. How can I stop the projectile from spawning if the animation hasn’t ended?
Put an animation notify at the end of your cast animation to trigger the fireball spell. If the animation is interrupted before reaching the notify it will not fire.
I see… However, when I spawn the projectile, I use the ‘find look at rotation’ of my character so that the projectile goes in my direction. I wouldn’t know how to do that in the animation blueprint. Is there a way to do it in the blueprint class?
Set notify in spell cast animation (near end)
Create custom fire event in character or where needed
Reference the element with the fire event in the animation bp and hook up the notify event to the fire spell event in the character (or it’s component) using the needed reference
Documentation for notify events
1 Like