Blocking

drewjohnson71
Mon, 26 Dec 2022 17:22:01 +0000
Blueprint

I understand how to do basic blocking, click the block button, turn on a blocking variable, and while character is blocking they cannot be damaged.
What I’m hoping to do is make it only block damage from one direction. If I am facing an enemy and block, I avoid damage to the front, but if I’m fighting two enemies and one hits me in the back, I want to take damage. Any suggestions on how to do this?
I’ve experimented with creating a collision box in front of the player, so whenever I hit the block button, it turns on collision, and when the enemies sword overlaps, it cancels the attack and causes the enemy to recoil/stagger back. The issue is, when getting attack from behind, the enemy sword still hits the collision box and cancels the attack, etc.

3 posts - 1 participant