Knocking back an enemy after it gets hit

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I was wondering how you make a knockback effect, when you strike an enemy. The first thought that crossed my mind was to have detectors or something at either side of an enemy, then say for example, if the player strikes the enemy with a sword, the enemy will get knocked back in the direction of the detector, that the sword collides with.

    This doesn't seem like a very effective method though, as what if the sword is larger than the enemy and it hits both detectors? Is there a better way of achieving this?

  • Hey Enchantainment,

    Here's an example made by Sparckman modeled after Ninja Gaiden getting hit. When the ninja gets hit, the ninja is destroyed and a second ninja is created (this second ninja is animated like in pain) with a simple "pinball" effect that gets knocked back. There is a long active sensor that runs along the ground. When the created "hit" ninja contacts the active sensor, he gets destroyed and the original ninja is created again ready to go.

    Please login to see this link.

  • Can't you make it dependent on which direction the enemy is facing when struck? Let's say if the enemy is facing left when hit, make the enemy move right a few pixels.

    Alternatively, if your player x co-ordinate is lower than the enemy being hit, make the enemy move right. Do the opposite if your player x co-ordinate is greater than the enemy.

  • woa I was just making the same example for someone else lol but here is the link
    I'm not using any sensors :D
    Please login to see this link.

    Please login to see this link.Please login to see this link.
    Take a course in Clickteam Fusion Please login to see this link.
    Youtube Please login to see this link.
    Please login to see this link.

    Edited once, last by Sparckman (July 31, 2015 at 11:57 PM).

  • You simply need to use multiple movements, specify one when the enemy is being hit, change back to the standard movement after some time.

    Take a look at Please login to see this link. and Please login to see this link..

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!