How do I knockback on enemies while moving?

0 favourites
  • 3 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hi

    Recently I added knockback event on enemies and good when enemy keep on their position. but the problem is when enemy got hit from player for the first time, enemy just want to go to player, but every time arrow hit on enemy they wont knock back anymore. Im using pathfinding and moveto along pf. how to fix that? the gameplay is like archero(android).

    thanks

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not sure I understand. When an enemy stands still, the knockback works. But when the enemy is moving, the knockback doesn't work. Is this correct?

    Maybe the MoveTo has priority over the 8direction behavior. Try changing their order in the list of behaviors:

    If this doesn't work, try disabling MoveTo for a brief moment when the arrow hits the enemy. Or maybe set its max speed to 0.

  • Not sure I understand. When an enemy stands still, the knockback works. But when the enemy is moving, the knockback doesn't work. Is this correct?

    Maybe the MoveTo has priority over the 8direction behavior. Try changing their order in the list of behaviors:

    If this doesn't work, try disabling MoveTo for a brief moment when the arrow hits the enemy. Or maybe set its max speed to 0.

    true! this is what I need.

    changing the order of behavior doesn't work. But the second option work very well!

    thank you sir

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)