Implementing knockback

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

A clear and concise description of what you are trying to do.

Trying to implement knockback upon enemies taking damage.

What is the expected result

Enemies should instantaneously be knocked away from the player.

What is the actual result

Enemies are knocked away but at a delay.

Related screenshots

Please include a screenshot of the full related events including both conditions and actions.
And screenshots to help showing us the issue.

Here’s also a video showcasing the issue:

I think the problem is that the pathfinding move to player is still active when the enemy takes damage.

Try deactivating the pathfinding behavior when the enemy takes damage, then activate it when “TakingDamage” animation finishes.

1 Like

This was the issue. Thanks so much!

Hey insein. Sorry for the double reply. While I’ve fixed this bug I’ve encountered a new one.

After letting zombies chase down the player, upon hitting them with the staff attack, the zombies teleport to their original position in the scene. Do you possibly know what could be causing this?

I believe you should also add the action “move zombie to player X & Y” after the TakingDamage finishes, to reset the pathfinding path.