PaulStrife's Recent Forum Activity

  • I'm new to the engine, so I'll try to help you as best as I can with my limited knowledge. Luckily, this is something I'm looking to implement myself in the future.

    This may not be an ideal solution, but it works rather well. I'll let you figure out the exact values you want yourself.

    1) First, set a height you'd like to use for your jump. This will be important later. It can't hurt to have control of this.

    Event:

    System - On start of layout - Player - Set Platform jump strength to 600

    Your player will have to have platform behaviour, I assume they already have it.

    2) The next step is to disable Jumpthru.

    Event:

    Keyboard - On S down (or arrow down, whatever fits your case) - Set jumpthru Disabled

    3) The issue with this is that if you are standing on a Jumpthru when doing so, it doesn't register until you leave it or jump. Which is why you should force a jump.

    Adding a new action, to the event in step 2:

    Player - Simulate Platform pressing Jump

    4) It looks a bit unpolished to jump, when your player wants to fall. It's best to change the jump strength to something low. It will not be visible to the player, but it will allow them to fall through the Jumpthru they are currently on, and the jump is not visible.

    Adding a new action to the event in step 2:

    Player - Set Platform jump strength to 1

    5) This is all well and good, but now all your jumpthru platforms are disabled, and you can't jump more than a single pixel. We need to fix that by making a new event, but we want to set a wait period to allow the player to get through the platform (change it to whatever length you want).

    Event:

    Keyboard - On S released - System - Wait 0.3 seconds

    6) Next we want to re-enable Jumpthru platforms:

    Adding a new action, to the event in step 5:

    Jumpthru - Set Jumpthru Enabled

    7) Now we need to fix the jump, this is where setting a strength in step 1 comes in handy.

    Adding a new action, to the event in step 5:

    Player - Set Platform jump strength to 600

    Here is an example capx:

    https://www.yousendit.com/download/M3BubUpUQ0NOMUNFTmNUQw

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Where I'm stuck is attempting to give a physics vehicle the ability to jump, with a very clear and predictable path. Since the vehicle relies on physics for the wheels, giving the body platform behaviour really causes everything to go crazy. I attempted to instead use a physics solution (impulse), but the jump was incredibly unpredictable. That makes designing a platform game a nightmare.

    Is there any way to use the vehicle in my capx file, and give it the ability to perform a predictable jump (arrow up key)?

    Another important factor was that I do not want the car to ever flip over. When using physics for jumping, I created angle restrictions for the CarBody to never go outside the 20 or 340 degree angle range. I removed that from the attached capx file, since a better jumping solution may not need this.

    Another important thing is that the vehicle should never be able to jump while already in the air. I might have to solve that with an attached helper to the bottom of the vehicle, with a condition event to only allow jumps when it overlaps the ground(again, dependent on a better solution).

    Here is my capx:

    Vehicle capx

PaulStrife's avatar

PaulStrife

Member since 7 Apr, 2012

None one is following PaulStrife yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies