I have a blueprint set up where when the player hits the other character he’s killed. This works perfectly, but when i add other enemies when they hit the original enemy the player is killed. I want to ignore the hits from the other enemies so my player only dies when they hit the enemy.
I also have another problem, when I replicate the OnActorHit Event for my second enemy (The bottom set) when i start the game the player is killed immediately. They’re not touching or hitting the second enemy at all.
On ActorHit Node, click-n-drag “Other Actor”, this will show up context menu.
Now type cast to “The BP/Class you whant filter”.
This will give you a node with 2 return arrows. Cast Failed and de default one. On default one, connect to your current destroy actor.
this will filter your hit event to only firesup to specific actor class.
I’m not at home with Unreal Engine now. But try to search how to compare actors of same class. Other hint is put a TAG on player, and use node “Actor has Class” compare it.
1.First, add your character public bool variable “isPlayer” with default value false. When you start playing set that variable to true. After hitting , get if hit actor is character and “isPlayer” is true ,then kill player.
2. Add "isplayer "tag to your character after event on begin play and after hit get if character contains tag “isplayer”. sensitive.