0 Favourites

How do I have continued momentum during jump

  • Hey All. What I am trying to do is during the players jump continue the forward momentum when the player is not using the left join stick. One thing I thought of that I figured would work is the following:

    Event - animations - Is animation "idle" NOT playing

    SUBEvent - player - Platform is jumping

    -or-

    SUBEvent - player - Platform is falling

    SubSubEvent - player is NOT mirrored - simulate platform pressing Right

    SubSubEvent - player is mirrored - simulate platform pressing Left

    This however does not seem to do what I want, which is only apply the simulation when the player was running. As a side note (is Moving) does not work as it seems jumping/falling triggers that.

    So with this result if I jump while standing still the player then moves to the left or right depending on which way I am facing when instead should just jump straight up as normal.

    Any thoughts on how to do this? I would think the not for idle animation would keep if from entering the subevents but that does not seem to be the case.

  • Ok I see the fault in my was here. Once I jump or fall the idle animation is no longer player there for can enter the subevents. I will continue to brain storm this one.

  • Ok so I figured this out. I created a variable on the player calling moving (default to false). Then in my normal movement event I added an action to set moving to true. I then added a new event for when idle animation is playing to set moving to false. Then in the SUBEvent I added a condition of is Moving from player.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You might just want to try lowering your platform deceleration while he's in the air. Something like:

    Player is jumping

    OR

    Player is falling

    Set player deceleration to 100

    Else

    Set player deceleration to 1500

  • Thanks calebbennetts but that only slows down the player in the fall. I was looking for forward and backward momentum. Currently what I setup is working great. If I find a better way Ill be sure to post it back here.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,728
MPPlantOfficial's avatar
MPPlantOfficial
Unread hot topic
39 2,528
planetserve's avatar
planetserve