How to I kill enemies by jumping on them?

0 favourites
  • 8 posts
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • So I've been trying to follow the tutorials where you make enemy sprite, create an event where

    if player collides with enemy

    then either check if platform is falling (if so kill) else player take damage.

    This does not work for me! I don't understand why. I have the platform behaviour attached to my player box. The hitboxes are fine. But the "is falling" condition never activates.

    I also tried another tutorial where I had to setup an animation that would fire when falling, that didn't work either. Where am I going wrong with platform behaviour?

    <img src="http://i.imgur.com/gqZpwy8.png" border="0" />

    Also, can someone explain to me how setting the platform's X or Y vector works? I set the vector X to -2000000 if I run into the enemy, but it knocks me back only a tiny bit. Even if the number is -60000000 or -500 it doesn't make a differenc.e

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure where the issue is as it seems to work fine for me, here is the events that I have from that same tutorial that work just fine:

    <img src="https://dl.dropboxusercontent.com/u/10285716/EnemyJumpKill.png" border="0" />

    You may want to post the CAPX so we can take a look, there may be a behavior or event issue that we cannot see outside of the events you are showing us.

    For your other question, Vector X/Y moves the sprite in the appropriate direction by that many pixels... Assigning a negative value to Y moves you upward. Assigning values to X moves you either left or right. So you need to capture the direction the player is moving when using the X vector as you need to know which way is "back" when you want to bounce them. My double jump and wall jump tutorials have a bit of tweaking with this as well. You can find them in my signature.

  • Also, can someone explain to me how setting the platform's X or Y vector works? I set the vector X to -2000000 if I run into the enemy, but it knocks me back only a tiny bit. Even if the number is -60000000 or -500 it doesn't make a differenc.e

    You'd have to change the player max speed as well. It won't make a difference if you set vectorX to 500 or 60000000 if the player max speed is 330.

  • dropbox.com

  • bump

  • This was covered in the C2 class this past weekend, you might want to watch the video here where Yann shows how to stomp enemies:

    http://www.scirra.com/forum/construct2-live-class_topic65550_post409490.html#409490

  • Hi guys..I have the same problem like ramones...why vector X is working just a few pixels only...I know there are other ways to move a collided player far from the enemy...but i would like to use vectors...any suggestion ???

    thanks

  • AnthonyB28 an easy solution may be to just have a sprite pinned to the feet of your character and when that collides with the enemy it will destroy the enemy.

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