when a character attack using hands the hands have a box collision that damage the actor that overlap in the box and when the character attack it damage it self is there is a way to stop collision of targeting the owner?
Wouldn’t it be easier to just check which actor it’s colliding with, and if it’s the owner, simply don’t apply the damage?
i usually use “on component begin overlap” - then get the other actor or component and make and use function “has tag” → branch, you then just have to set the particular tag on the actor or component. otherwise != self is possible on components or actors as well …
the thing is i dont want it to ignore all actor from the same blueprint i only want it to ignore the owner for example if a character is a wolf for example i dont want it to ignore other wolf too i want it too still be able to damage them but stop damaging himself
Check other actor != self
it didnt work for me idk why i used on component begin overlap and and connected other actor != with self and still didnt work
it didnt work for me idk why i used on component begin overlap and and connected other actor != with self and still didnt work Do you know a better a way of doing it
Then just compare it to the owner. If that doesn’t work share your BP so we can be of more help.
i alrd did this != self
in this part it check if the overlaped actor is creature or damagable actor
here it see if the actor is moving or not to know what animation to do
here the actor that overlapped will have a ref so we can see if its valid to apply damage
here it apply the damage if the ref was valid
ik my bp is complicated a bit but i will send it anyways
and also when the actor overlap end i will un connect the ref
or wait i think the reason is bcuz when other actor overlap with the box its not equal to self so they will pass the branch and then both will take damage do you know how to stop it
update: i kinda fix it but i think it need to be better cuz it will probally have a problem how i fixed it , i did this by before applying damage to the actor it will check again if its self or not why do i think there will be a problem bcuz if two of the same actor type got into a fight and one of them is not self the system would get this issue
summary of the update : i fixed the issue but will still have an issues if two of the same actor got into a fight bcuz one of them wont be self
By the way.if you wan to apply damage you could use line trace,sphere trace. They come with “ignore self”option. And would more precise.
Because collision box sometimes miss to check. Traces never missed.
ye i noticed it was in false instead of true so i changed it
and thanks for your advice i will make sure to checkout line traces or sphere traces
btw i tried line traces before but it didnt go well tho