How do I have continued momentum during jump

Just started using Construct 2? Post your questions here

Post » Fri Oct 14, 2016 6:58 pm

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.
B
6
Posts: 10
Reputation: 272

Post » Fri Oct 14, 2016 7:32 pm

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.
B
6
Posts: 10
Reputation: 272

Post » Fri Oct 14, 2016 10:33 pm

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.
B
6
Posts: 10
Reputation: 272

Post » Fri Nov 04, 2016 1:14 am

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
:arrow: :!: Set player deceleration to 100

:?: Else
:arrow: :!: Set player deceleration to 1500
Eh, Steve!
B
115
S
54
G
13
Posts: 112
Reputation: 16,150

Post » Sun Nov 06, 2016 3:05 am

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.
B
6
Posts: 10
Reputation: 272


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 6 guests