How do I Jump in platformer when there is something above?

  • How do I jump in platformer(with solid) when there is another platformer (with solid) above ?

    I have a Player with platformer behavior with solid behavior too and it can't jump with another Player with solid and platformer behavior above it? Does anyone have any ways to make a platformer-player jump and bring another platformer-player above with it?

  • Can you be more precise ?

    For what i understand, you want the playe 1 to push the player 2 when he is jumping on a platform and P2 is already on it.

    If that's the case, add a physic behavious to both of the players and enable "Prevent rotation" in their properties

  • [quote:1pw9ob3r]If that's the case, add a physic behavious to both of the players and enable "Prevent rotation" in their properties

    I didn't totally understood the situation too but I don't think your answer will help him : if this guys adds a physic behavior on the characters, they will pass through the ground and every other platform because Physic engine and Platform behavior are not compatible. So your solution will certainly just create some problems (I suppose).

    Now, author, as said by Oxy, we need to have more precisions. So, you have two sprites with platform behaviors. This behavior allow them to move around and collides with all the sprites which have a solid behavior. So, why do you add a solid behavior to the playable sprites themself ? They don't need it to move and collide. If your character can't jump when another character is above him, it's because this famous character above has a solid behavior (so it's like a platform, so yup, you can't pass through it with your player).

  • I am sorry OnyOxis & LeuNoeleeste for not being precise but I cannot use physics for that because it will cause more problems and it wont work with this type of game and performance is also at risk.

    My point is that I want to make a simple event that if the Player2 (w/ Platform and solid behavior) is on top of Player1 (w/ Platform and solid behavior) then the Player 2 will be pushed up when Player 1 jumps.

    I want to make that event without the use of Pin behaviors, Custom Movement and Simulate controls for it will make things complicated. In other words, I am looking for an event that maybe I missed that can make this happen noncomplicatedly. Thanks

  • So, just add the physic behaviour AND the platform behaviours to the players, and the solid AND physic behaviours to the platform.

    I will work on it and see what i can do

  • So, just add the physic behaviour AND the platform behaviours to the players, and the solid AND physic behaviours to the platform.

    I will work on it and see what i can do

    Regarding the mixing of physics and other behaviors, the manual entry for the physics beavior has this to say:

    [quote:hvoewcst]Using Physics in Construct 2

    The Physics behavior simulates physics separately to the Construct 2 layout. Construct 2 will try to keep the Physics and Construct 2 "worlds" synchronised if one changes but not the other, but this can be unpredictable. For example, setting an object's position or angle will cause Construct 2 to teleport the corresponding object in the physics simulation to the object's new position, which does not always properly take in to account collisions. The same is true of using other Construct 2 behaviors at the same time as Physics.

    Therefore it is highly recommended to control Physics objects entirely via the Physics behavior (by setting forces, impulses, torques etc.), rather than trying to manipulate objects by Set position, Set angle etc.

    Another consequence is Physics won't respond to objects with the Solid or Jumpthru behaviors. These behaviors are totally redundant when using Physics and have no effect. Instead, use the Immovable property.

    In other words, mixing behaviors with the physics behavior can - and usually does - introduce unusual and unwelcome glitches.

  • [quote:2pa0emrl]So, just add the physic behaviour AND the platform behaviours to the players, and the solid AND physic behaviours to the platform

    Not. Compatible. You will just end up with chaos and tears

  • [quote:2sm9b4vt]So, just add the physic behaviour AND the platform behaviours to the players, and the solid AND physic behaviours to the platform

    Not. Compatible. You will just end up with chaos and tears

    That's true

    Try this one :

    download1587.mediafire.com/kxwb9ebmz53g/42i4vvevpwegq6q/Player_Push.capx

  • OnyOxis

    You might want to update the version of C2 you are using - r208 is over 6 months old and there have been many changes since.

  • I have a working version, Player 2 can be pushed by Player 1 :

    download1337.mediafire.com/ravtpc4ezwxg/2vyic0fgtqtd9do/Player_Push.capx

    OnyOxis

    You might want to update the version of C2 you are using - r208 is over 6 months old and there have been many changes since.

    I know, i changed my computer and lost the last version

  • You also don't really need the bullet behavior. You can just use 'simulate jump' for player 2.

  • I tried a "simulate jump" but that didn't work with my other events, i will try

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a working version, Player 2 can be pushed by Player 1 :

    http://download1337.mediafire.com/ravtp ... _Push.capx <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    > OnyOxis

    >

    > I think you didn't get what I mean. I want player1 to push player2 above like a carried object without the use of any platform object but your example used a platform object to push it up and also required pin and 8 movement behavior which made it more complicated. But thanks for trying though XD.

  • Haha, sorry xD

    But that works, and ... im proud of it x)

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