How do I create a physics explosion that affects the player with?

0 favourites
  • 5 posts
From the Asset Store
200+ Unique, Single-Frame Explosion sprites! This is the ultimate explosion sprite bundle!
  • So I'm attempting to design a platforming puzzle game where the player utilizes explosive projectiles to extend their jumps, essentially a rocket jump. The main issue is, I'm 3 days new to the engine. How would I go about creating a projectile that will create close-range knockback to the player upon coming into contact with any surface or wall?

  • Edit: After some further experimenting, I've created an explosion entity using the code:

    Apply Physics impulse distance(Target.x, Target.y, Explosion.x, Explosion.y) / 100 at angle angle(Target.x, Target.y, Explosion.x, Explosion.y) at image point 0.

    This sort of has the effect that I am going for, however it is very slow and weak. It's less of a blast and more of a lame push. My character also drops like a stone the second they aren't being pushed by the explosions. No momentum is preserved. It may require some tweaking to the platformer settings, but in the event that that isn't the case, I'd like to know what more physics commands I need to write.

  • If you increase the impulse strength (by decreasing your division) you'll get a more dramatic reaction

  • This did indeed help. Thank you. However, the character doesn't keep the momentum. As soon as it reaches the outer rim of the explosion, it stops moving. Anyway to simulate this as well?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • elliot

    The issue is, there is no momentum. I'm trying to do a wall jump section, but the player isn't blasted far enough to hit the other wall and shoot it. It loses its gained speed once it leaves the explosion. Is this due to it's platformer behavior, or something else I'm missing?

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