How do I have continued momentum during jump

0 favourites
  • 5 posts
From the Asset Store
Jump on alphabets in the proper order and reach the sun!
  • 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.

  • Try Construct 3

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

    Try 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)