I am trying to create a blocking mechanic for my npcs. To do this i created a line trace that will hit the npc just before the players projectile attack will hit it. Thus alerting the npc that he must start blocking. It almost works but the NPC is responding to a hit on any NPC as opposed to only when the attack will hit him.
I get the feeling im doing someething very basic wrong. Thank you for your help.
Hey @emperorrobert!
Could you show us some context with regards to which actors these codes would be on?
I’m certain it has to do with you doing a call, seems like a dispatcher situation when you need to do a direct communication. To figure out the best course from here we really only need to know which blueprints these snips belong to! The main thing is you need to get your hit actor, cast to bad guy to make sure it IS one, then As BadGuy do the “Projectile Will Hit”. Reason for all this is specifying WHICH enemy, otherwise it seems like it’s going out as a delegate call which hits everything with that function. Hope that helps! 
Hey thank you, Here is some more context.
the line trace and the attack will hit function belong to the player character (gothchickC). The line trace is done at the beginning every projectile attack she shoots. This is a first person shooter so she shoots a lot of projectile attacks.
The block belongs to the NPC (WereWolf) which like every enemy is a child of the base enemy NPC (NPCBASE). I would like it so that some enemies are able to block attacks but others will not be able to.
Hey I figured it out, It works great now. Thank you, once again you got me headed in the right direction.
1 Like