This is why the game makes instances of identical actors placed in the level. You can have a character blueprint, one animation blueprint for that character blueprint, place 10 of them in the world, and it will only cast to the relevant one that performs the animation.
Here’s an example of enabling weapon collision in by animation notify for an AI:
Because I’ve set up a master enemy blueprint, and the Skeleton OneHand blueprint is a child of that blueprint, it has all the same functions without me having to add anything. I can have hundreds of these in the level and only one will perform the action. Instances are created when you have duplicate actors in the same level. So if you drag in 5 Skeleton Onehand for example, they will be Skeleton Onehand01, Skeleton Onehand02 etc.
No need to cast to a specific placed actor.
I got the following problem: I’ve create a AI Blueprint with its own animation BP. My task is to get a reaction animation of my ai when it’s hitten by a blade (working with animation notifys). For this i have to cast to my Ai Blueprint, out of the animation BP and got this problem:
Appending to a solution in another section:
The solution was to get a list of all exsisting SimpleAIs on the map and then do the code with a for each loop, but
in my case it isn’t the best way to do it like that right? Because it would cast to every AI on the map and every AI would do the reaction not only the one who’s hitten.
So I need a way to cast to exactly the AI who’s Animation BP fires the notify event. Do you have an idea?
Hope you understand my problem.
Many many thanks
Hey Cowley, thank you for your helpful answer. I got it now. Works fine!
I drag out the blue pin from “Cast to Skeleton Onehand BP” and select promote to variable.
Ah saw you updated, guess you got it right.
Should note I only use BP Reference because my anim blueprints tend to get fairly large after a while. You could also just drag out the pin from the cast node, but I choose to store for tidyness.
Yeah i totally misunderstood you at first. I did now with a reference like you. Was very helpful for general, also in other topics.