Not include an object in "actor"

Hey guys !
Today I am revisiting my melee block system and just realised there was a problem. Basically, my block system works this way: you have a box in front of your character and when the input defense is pressed, the collision response to channel is set to block. Now for my attack system I am using the apply damage function and as I did a line trace system, I use the break hit result to determine the hit. However I have to plug my damage to the hit actor node and the problem with that is that even if the line hits the box it will apply damage to the character. Here is a picture of my setup.

Any help is appreciated :slight_smile:


I’m trying to replicate this issue, could you try to print string the hit actor display name and see what it’s actually using as actor?

Well it prints the name of the player as we could expect :slight_smile: but i don’t really think it’s an issue, I put the box in the character blueprint.

(The player that is hit)

Oh you’re tracing something inside the same blueprint? Yeah that will cause to hurt yourself.

Yes exactly and I was wondering if there was an alternative to hurting myself in any case

Depends as i’m not 100% sure what you want.

If you want to not ever hurt yourself, even when hitting the box make sure to tick “ignore self” in the trace and do a check that (hitactor != self) branch before doing damage.

Ok so let me be more precise. First of all the game is multiplayer so i need to hit other players with that lign (wich works).Now I want it so that if the box is blocking the ligns , it doesn’t apply damage to the player when this box is hit as the box is considered in the actor.

Oh, what you want to do is get the Hit Actor Component and see if this matches a certain tag or collision channel.

Set the shield collision box tag to “shield” or what not and if the component equals “shield” on it’s tags then don’t inflict damage.

Hey i can’t find the blueprint to see if it matches a certain tag or collision channel :confused:

No i mean the if component equal part

ok i think the engine really doesn’t like putting a branch after the break hit result so it doesn’t work :confused: