Destroy Enemy

Hello. I’m studying AI blueprints with Asher Einhorn tutorial on youtube and need to kill the enemy (not me) when I shoot de bullet on it. But when I do it, my players die instead of enemy. I tried to put a public variable of the enemy (AIShooter_Character), adding it to the target of Destroy Actor on CharacterBase (both have inherit from it - player and enemy), etc, but nothing happens… The Enemy didn’t die (in this case my player was alive). On below, like show the image, I left the code as it was usually when the player dies. With someone else can help me to fix this issue.

If the Bullet or the Trace (whatever you use) you need to call the “Interface Message” and not the Function that has the same name (Node has a little envelope and Target Pin). Otherwise you execute the Function on yourself instead of the Target. For the Target of the Interface provide the Actor you Hit and everything should work fine.

Good Luck and have Fun =)

I’m using Trace (sounds like Line Trace By Channel?)… Here’s the another image. From PlayerShooter_Character:

Yes thats Correct and you are using the Interface correctly. You should also do a isValid in front because the trace can hit Nothing sometimes. Can you Print String the Display Name of the Actor you hit? If its your Character than you somehow manged to hit yourself (you can add actors to ignore self refference in that case). If its the Enemy than the Problem is somewhere else.

Forgot the screenshot xD Screenshot - 177134fd85b721410f3888f60c78918b - Gyazo

Yes. Is hit my own character (player). I’ll try to add some actors of reference and then, back with answers.

@anonymous_user_fb796d6c: Now I add actors to ignore self reference like the image below and I hit the Objects, Enemys with bullet, but the enemys don’t die (disappear). ‘-’

Now its work! Thanks a lot man =)

Here’s the SS from this blueprint:

I was put the Target from Interface Message in new variable (wrong way) and not on the HitActor… So it was working wrong… fail… Now just ajusted errors and all flows done well. xD