How do I make an enemy bounce when they are hit?

0 favourites
  • 10 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • I'm still a pretty big novice when it comes to Construct 2 and I don't know if this can be done without plugins or real code, so here's a doodle to demonstrate what I'd like to have happen:

    (open the pic in a new tab if it gets cut off)

    Basically, when the player hits the enemy, I want the enemy to fly in a parabolic arc (I'd like to be able to set the angle, for different attacks) and bounce when they hit the ground, losing a set amount of momentum for each time they bounce until they are stationary. I'm pretty much lost on how to implement this into my game code wise. If I need a plugin to make it possible/easier let me know and I'll grab it.

  • One simple way without to much coding I can think of would be using the bullet behaviour with gravity..

  • CJacobsSA There are many demo tutorial in link below

    https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0

  • Thank you both, through a combination of your posts I got it working with physics and all. My next question is: Is there a way to get the enemy's physics to "pause" for a split second when it hits the ground for a bounce, then continue as it was just to give it a bit more oomph?

  • Although I'm not sure if this would work with physics and I doubt using physics is the wisest decision in this particular case, using the system action set object timescale, for a certain amount of time could get you this effect..

  • Although I'm not sure if this would work with physics and I doubt using physics is the wisest decision in this particular case, using the system action set object timescale, for a certain amount of time could get you this effect..

    Why do you say that? Are there hitches with physics that the bullet behavior doesn't have?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All behaviours work different..

    Choosing the right one is up to the person creating the game..

    Hitches isn't the right word, possibilities and limitations..

    In my opinion people use the physics-object in many cases it isn't completely nescessary and often run into issues trying to make it play nice with other behaviours and/or using to much processing power for things that could simply be coded..

  • CJacobsSA All performance of any given instruction work differently. prefer the right one is up to the individual constructing entertainment software. LittleStain is perfectly right in what he says because depend on person what he or she wants software to perform and how fast.

  • I see! Well, I'll make a branch real quick to test out bullet behavior instead of physics behavior to see if I like it better, I'm sure it won't take too long to find what I like better. Either way, your object timescale solution worked, so thank you both for your help! I appreciate it!

  • CJacobsSA can you please share with me a capx i m trying to make the same kicking effect

    thanks

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