How do I bounce on enemy's head?

0 favourites
  • 9 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • I'm sorry for this thread, I know this has been asked dozens of times already but even if I found several threads asking it, I couldn't find a solution for my issue.

    Also, please forgive me if this is something easy, I'm a total noob with construct. Please be patient with me.

    I'm trying to make a local multiplayer game in which jumping on the enemy's head makes your character bounce, without killing the enemy.

    I thought it was easy, I followed the "how to make a platformer" tutorial and used the same behavior it used to jump on the enemy and kill it, minus the killing part. I also removed the part that said "if the player touches the enemy at other angles he gets damaged", since I don't want that to happen. I just want to continuously bounce on the enemy's head when I jump on it.

    The point is that it doesn't work. The character just stays on top of the enemy's head.

    Here's my .capx, in case you have the time and the patience to help me (please).

    (https):// www (dot) dropbox (dot) com/s/98lfgvjyo5nrqud/ayy%20lmao.capx?dl=0

    Notes:

    -The grey alien moves with the directional arrows

    -The pink alien moves by connecting an xbox 360/xbox one controller and pressing "A" to jump and the D-pad to move

    -Being this a local multiplayer game I tried to make this behavior happen exactly the same way for both players

    -I tried using "on collision > compare y to player2's y" instead of "platform is falling" and while it seems to work better, at first, it gets randomly activated by simply touching the enemy, without actually jumping on him.

    -I also tried adding an invisible sprite to player 1's feet but the detection seems very imprecise, sometimes it works and sometimes the player just stops on the enemy's head

    Sorry again for causing trouble (and probably messing things up haha...) and thank you in advance for your help.

  • ............

    Amazing thank you! That's not how the platformer tutorial nor the live twich lessons explained it... do you mind telling me what you exactly did? I mean, I've seen it but being the noob that I am I truly can't understand how you could fix it.

    For what I understood, the "is overlapping" command only works if the sprites aren't solid, how could they actually overlap each other when they are solid?

    Also, while this solution is incredibly close to be working, it's still possible to make one of the two aliens stop on top of the other's head. If you keep mashing the jump button while an alien is bouncing on your head, after a few tries you can stop him.

  • Thank you so much, a picture is worth a thousand words!

    Thank you again, this is perfect.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the 7th part of Ashley's "How to make a Platform game" tutorial, he demonstrates a great way of doing this:

    https://www.scirra.com/tutorials/253/ho ... ame/page-7

  • In the 7th part of Ashley's "How to make a Platform game" tutorial, he demonstrates a great way of doing this:

    As you can read in my previous posts, that's what I did at first. It seems that the method described in that tutorial isn't very reliable when you just need the bounce effect, without actually killing the enemy (or, at least, it isn't in low-res pixelated games like mine).

  • Oops! Read it too early in the morning. My apologies.

  • Hi.

    The linked files don't exist anymore and I'm trying to achieve this effect. I want the player bounce off the enemi when jumping or falling on its head, but not if it touches the enemy from the side.

    I tried something like :

    Player -> is overlapping enemy at offset (0, 1)

    Player -> is NOT overlapping enemy at offset (0, -5)

    But it doesn't work as expected. It limits the player from bouncing on an enemy when coming from the side but it doesn't totally prevent it, and if the player if falling at high speed, it passes the Y -5 offset and doesn't bounce on the top of the enemy.

    Any idea ?

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