animation problem during the jump

  • Hello everybody,

    I begin with construct 2 and I have a problem for a basic movement :

    I want use animation with multiple frames during the jump, if I jump without use left or right movement (with simulate controle assigned to a key), animation play, but as soon as I press the move button the animation block, it work only if the move button is not use, someone knows how to solve this problem to use the animation with the active motion key ?

    Thank you in advance.

    Sorry if my english is not good.

  • I will assume you have used simulate control for the jump also? Best way to resolve is to use 'platform on jumping' play jump animation.

  • I also tried "on jump" but I have the same problem, as soon as I move the character on the right or left the animation stops... :/

  • You will most likely have conflicting events for animations such as when you jump and move left/right it tries to play other animations together. You will need to get into the habit of trying to limit which animations are playing with conditions. If you post a screenshot of the events or share capx then I can help.

  • I tried to put an image but it had not worked, I try again ...

  • Also check origin image point position and collision polygons for all frames/animations. This is the most common cause of problems with Platform behavior. For example, if you have different collision polygons in Walk animation, you character may appear above the ground on some frames (in "falling" state) and this may be the reason why it can not jump.

  • It jumps, it's the animation that does not start and stays stuck on the first frame.

    casimages.com/i/18081709154548880.jpg.html

  • All sprites of the object must have the same size and the same point of origin, or just the sprites of the same animation?

  • Ideally all collision polygons and origin points should be the same in all animations/frames. This is not always possible, that's why a common trick is to use a different (invisible) sprite "PlayerBox" with Platform behavior and a very simple rectangular shape. Remove Platform behavior from the main character sprite and pin it to PlayerBox. As a result, you will actually be controlling PlayerBox, and character animations will not mess with Platform movements.

  • I tried with the player box, the posted image is just a simplified example of my problem, in fact I would like to do a running game, so the character runs automatically, and it is when the jump + advanced is activated that the animation is not played, so I wanted to understand why the animation is not played if the movement is simulated at the same time as the jump, I have the same problem with a box for movement...

  • You have to make more logic s.

    If you have 2 animations "walking""jumping"

    You need also 3 variable walk = false jump = false walk_jump = false.

    If left button pressed set walk to true , if walk = true and jump = false set animation "walking".

    if jump button pressed set jump to true , if jump = true and walk = false set animation "jumping".

    If left button and jump button are both pressed set walk_jump to true , set jump to false, set walk to false set animation to "jumping".

    On landed set walk_jump to false.

    But you have to play with that if you want to add and fire or run animations.

  • Thank you for your help, I study these different ideas, I realized that by disabling some groups animation problems disappeared. I also have the opposite problem when I press a key and I stay pressed it plays me a continuous animation (while it is not loop), can we simulate a release of key after of a second for example ?

  • Thank you for your help, I study these different ideas, I realized that by disabling some groups animation problems disappeared. I also have the opposite problem when I press a key and I stay pressed it plays me a continuous animation (while it is not loop), can we simulate a release of key after of a second for example ?

    What type of key you use?

    Keyboard , Mouse or Touch?

  • I use the keyboard for the monet to test my project, but I count after export for portable use, so in touch ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do not use

    a) for keyboard "Key is down"

    b) for mouse "Mouse button is down"

    c for touch "is touching object"

    use

    a)"Key is pressed"

    b)"on click"

    c)"is touching object"

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