Destroy bullet and target on hit

Hey all,

I’m trying to achieve something fairly simple. I have a ball that I’m using as a projectile and trying to destroy other actors and itself on hit. Also, I was trying to add an effect from the BP_Effect_Explosion from the starter pack.

This is what I have so far:

Actors do not get destroyed. Collisions do happen and the barrels get knocked by the bullet

The bullet gets destroyed, right? You have that code there.

However there is no destroy for what was hit. I suggest either putting the same code on the target (on hit destroy me) or have the bullet call destroy on “other” - possibly after casting to make sure it is something you want destroyed and not a wall or something.

The bullet does not get destroy either.
On other I have the bp_barrel linked and == to the branch condition. Nothing happens :frowning:

I’m sure it’s got something to do with the physics and collisions I set, but can’t figure out what…


The issue with your branch is that you are using ==. Don’t use that for this, use Cast To instead. That will tell you if this is “any” barrel. == only tells you if it is “this specific” barrely, which it can never be while running the game.

I doubt you only want to destroy the bullet when it hits a barrel though. I recommend you CastTo the barrel, destroy that reference. Then destroy the bullet no matter what (maybe a Sequence with Cast To on first action, followed by the Destroy.)

It would look like this:

1 Like

would this be on the barrel bp? or the bullet?

if bullet, do I do it on the collision “sphere” or the static mesh itself (bullet)?

Ok, after playing some more with the collisions this actually works and it’s pretty cool.
However, is there a way to make it work for multiple targets so that I don’t have to build another event for each different actor bp that I want destroyed???