0 Favourites

How to make a simple sprite knockback in 8 dir?

  • I would like to make knockback to enemy when i slash enemy with a sword in 8 direction.

    Do you have an idea?

  • Use custom movement? Or set the position of the enermy everytick..........

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You could use the bullet behavior:

    +PlayerSword collides with Enemy:

    ---Enemy:Bullet:Set speed: 400

    ---Enemy:Bullet:Set angle of motion: angle(player.X,player.Y,self.X,self.Y)

    ---wait 1/4 seconds

    ---Enemy:Bullet:Set speed: 0

    If the enemies move with some other behavior then stop it's motion, disable it, move with the bullet behavior then re-enable the it after the wait.

    You could also use events or Custom movement like yuquanzhou007 suggested, whichever method you prefer.

  • You could use the bullet behavior:

    +PlayerSword collides with Enemy:

    ---Enemy:Bullet:Set speed: 400

    ---Enemy:Bullet:Set angle of motion: angle(player.X,player.Y,self.X,self.Y)

    ---wait 1/4 seconds

    ---Enemy:Bullet:Set speed: 0

    If the enemies move with some other behavior then stop it's motion, disable it, move with the bullet behavior then re-enable the it after the wait.

    You could also use events or Custom movement like yuquanzhou007 suggested, whichever method you prefer.

    um.............interesting methods,good thinking

  • You could use the bullet behavior:

    +PlayerSword collides with Enemy:

    ---Enemy:Bullet:Set speed: 400

    ---Enemy:Bullet:Set angle of motion: angle(player.X,player.Y,self.X,self.Y)

    ---wait 1/4 seconds

    ---Enemy:Bullet:Set speed: 0

    If the enemies move with some other behavior then stop it's motion, disable it, move with the bullet behavior then re-enable the it after the wait.

    You could also use events or Custom movement like yuquanzhou007 suggested, whichever method you prefer.

    This is really better than custom movement, thank you!

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