How do I get enemies to jump away after being attacked?

  • I'm making a simple Zelda clone to get to know Construct 2 a little better. I would like the "Wolf" sprite will move towards the player and then attack. My mechanics are very simple since I am a total noob so the sprite's attack is just running into the player. I would like to create a bounce effect so that if the "Player" hits the "Wolf'' it will jump or bounce away. Take a look at my event sheet...

    i.imgur.com/vXJobpG.png

    As you can see I'm trying to move the "Wolf" in different patterns by using the local number "Wolf1Trigger"

    Line 15 - When the player gets near the Wolf1Trigger moves to one and the wolf begins moving toward them.

    Line 17- the Wolf is hit by the weapon Knife and the Wolf1Trigger moves to 2

    Line 18- The Wolf should turn away and rapidly move for just a second only to have the Line 21- Wolf1Trigger move back to one and the speed reduce, and angle return toward the player.

    What actually happens is that the Wolf does activate on proximity and move toward the player- but for some reason when the wolf is hit the speed goes up and stays up- the angle does not reverse and the speed does not seem to reduce after the 0.3 seconds.

    Whats all the more of a pain is that I had this bounce off system working great a week ago but it just stopped for some crazy reason that I'm sure is my doing but I just don't know how.

    Thanks so much for reading this through. Any help you can give is appreciated. Have an awesome day.

    MD

  • This might not work, try Bounce off object when the player hits it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This might not work, try Bounce off object when the player hits it.

    Thanks Potatoe23, but the bounce command was my first attempt. It gives a little but just not enough for what I'm doing here and there seems to be no way to adjust it.

  • If you change the speed does it bounce back farther? If it doesn't ok

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