I ve been working on this for days and I still don t know how to do it
Hi @voicu4321
Is your shield an attached actor? Or a component?
If its an attached actor then you should be ok it will hit that actor.
If its a component it will be your character that receives the input, BUT you can break out the hit result and find out if it was the shield that hit or the player mesh (hit component). Then do your code based on which it hit.
Make sure both actors/components have the correct trace channel set to block, maybe consider a new channel for this set to ignore by default, then in the shield and player enable them to block all
it is attached to a component i think
i would appreaciate it if you could help me more with the code(i m new)
idk how to explain it, basically when i hit my shield i want it to make a sound, but it if it hits
BP_ThirdPersonCharacter_C_0 is making it hit my skeletal mesh too, causing the damage and the character’s hit sound, along with the shield one
and this happens when i get really close to the character, also this is on client server( with 2 players and it happens when i hit the 2nd one)
that will happen as you are inside the collision sphere, what you need to do is learn to differentiate the different collisions
so on the character itself goto the event hit and disconnect any code you have and move it away for now. bear with me i will load up a project and give an example, i will update this reply in a few mins
alright, thanks!
it s basically how i get the character damage and this is where it happens
ok here is the Normal way of event hit:
so instead add that code into your event pointdamage, connect the My Comp to the Hit Component.
Obviousley replaxe axe head for your shield component then run whatever code you want it to
I think i m doing something wrong, also this is the code from my shield (it would connect to a sequence and fire after this
so what does you print node actually print?
well, nothing except the bpthirdpersoncharacter
disconnect the main code at the beginning just put a print statement connected to the hit component, nothing else for now leave the other code there but not conected
nvm nvm, i had wrong collision settings for the shield, it s now printing
easily done is it getting the sheild? if so then now just branch off what you want from the shield impact and what to do if it hits player
yep, it shows this
perfect now you can do damage based on that or not
Please mark the problem as solved if this works for you so others can benefit if they have the same problem, mark the post that most accuratley gives the best answer