Sliding after landing

0 favourites
From the Asset Store
Learn lowercase and uppercase letters in English.
  • I used search function and didn't find the answer, though it's a very simple question: I'm using the platform behaviour, and after landing, my character is sliding if I keep pressing the left or right arrow.

    I have an animation for standing and one for running.

    I tried to add:

    Platform on landed - set animation "standing"

    But he still sliding.

    Then I'm adding another condition to this:

    "Keyboard - Left arrow is down - Invert" - set animation "running"

    Same with right.

    Now the character is running on landing...

    Help :)

    Also, I'd like to know to add a "crouch" behaviour.

    Thx!

    EDIT: Fixed this by replacing "onlanded" animation by "running". I noticed that the problem appears when I stop pressing any key when the character is jumping.

    If I do that, he will keep running after landing, any idea how to fix that?

  • Instead of using "On landed" for standing animations, you should use "Is (not) jumping" and "Is (not) moving". (not meaning inverted events)

    Those two conditions should be all you need for standing, walking and jumping animations.

  • Thanks for your answer.

    • "Is (not) jumping" and "Is (not) moving". (not meaning inverted events)

    What do you mean by "not inverted events"?

    My problem occurs when I stop pressing a key while jumping, the animation will loop even after landing.

    What I would like is when I don't press any key while jumping, the "standing" animation" will play on landing (and not cycling the running animation)

  • Where I write (not), I mean an inverted event. I didn't say "not inverted events", but I see how easy it is to misunderstand that, sorry for the confusion.

    I meant to say:

    "(not)" meaning inverted events.

  • Ok thx.

    When I'm using "is not jumping", it overrides the running animation.

    Same for "not moving".

    I'm forced to use "on landed", and it makes sense to me.

    But I can't find a way to fix my problem (animation looping forever)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use both conditons in the same event.

    +Is not moving
    +Is not jumping
    -> Standing animation
    
    +Is moving
    +Is not jumping (might not need this)
    -> Running animation
    
    +Is jumping
    -> Jumping animation

    If you're still having troubles, could you upload a .capx to a filehost like dropbox so I could have a look?

    Edit: By the way, after the platform object reaches the top of it's jump, it's no longer jumping, but falling.

  • I'm bored, so I made a .capx for you <img src="smileys/smiley17.gif" border="0" align="middle">

    BasicPlatformAnim.capx (r99)

  • Thanks a lot Nimtrix, it worked!

    I'm still wondering how to create this crouch behaviour.

    EDIT: Havent checked your capx, I'm using r95

  • I did crouching as well. Updated file in previous post to work with r95. (might crash, just let me know)

  • Thanks a lot again, it helped a lot! You rule ;)

    Btw how do you write titles in the event sheet?

    =

  • No problem <img src="smileys/smiley20.gif" border="0" align="middle">

    You can right click and choose "add comment", or use the hotkey "Q". You can find all you need to know about the event sheet features in the manual.

    You should check your animation's collision polygon in the image and animations editor and see that it's correcly set up. (Edit: But I guess you found out before I answered) <img src="smileys/smiley1.gif" border="0" align="middle">

  • Thanks AGAIN Nimtrix :)

    I have a problem with the crouch animation, it doesn't loop with your system. It's blocked on the first frame.

    I'm using "down arrow is down" and "set animation from beginning".

  • Hmm, I tested and it should work if you set it up like in the example. Make sure the animation speed isn't set to 0.

  • Hey,

    Here's the capx, that's where I am.

    http://www.filedropper.com/platformertest01

    You can notice that the crouch isn't animated.

    Same for the shoot animation.

    Also I'd like to know how to set up easily the spawn point of the shoot FX, I had to move the origin point blindly until I find the correct spot, kinda lame...

    Next step: finding a way to actually shoot using physics...

  • In my example there's a boolean so you're able to add the "Is crouching" condition.

    Here you go, changed some things:

    StampedoGame.capx (r95)

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