How do I reverse the platform jump movement?

Get help using Construct 2

Post » Wed Sep 10, 2014 5:31 pm

For example, suppose my main character is a ghost that floats, and I would like to make the ghost "dive" down to the ground (platform) and then return to the same height from which he started. I basically want to reverse the jump. This would be reversing the direction of a normal jump that is performed by clicking (in my example).

Another example would be that of a swimming fish. I want the jump command to arch the fish down and then back to its original starting height.

Any tips would be greatly appreciated. I can't attach a CAPX but was just "fishing" for suggestions. (Pun intended)

Another way to ask this question would be: Can movement be completely reversed? In case I wanted to introduce a level where up is down and down is up.
B
6
Posts: 16
Reputation: 284

Post » Wed Sep 10, 2014 6:12 pm

There are a few ways to achieve this, first you can use Y vector instead of jump with positive and negative values for up and down.
The platformer behavior also has an action to set gravity angle, so you can change it to pull up.
You should disable Default controls and set your own set of events, then you can choose which key does what and when.
Image
B
78
S
29
G
12
Posts: 515
Reputation: 12,559

Post » Wed Sep 10, 2014 6:14 pm

B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Wed Sep 10, 2014 6:16 pm

Lof wrote:There are a few ways to achieve this, first you can use Y vector instead of jump with positive and negative values for up and down.
The platformer behavior also has an action to set gravity angle, so you can change it to pull up.
You should disable Default controls and set your own set of events, then you can choose which key does what and when.


Excellent! Thanks. It's nice to know I was on the right path. I set the vector Y - a negative # and the correct gravity angle to pull up. My issue is that my jump (event triggered on any click) is completely ignored. I'll keep playing with it. Thanks for confirming that I was on the right path!
B
6
Posts: 16
Reputation: 284

Post » Wed Sep 10, 2014 7:23 pm

Figured it out. Thanks LOF. Thanks also A0Nasser for the demo.

The correct setting was:

On any click, set vector Y to - 500

On start of layout, set gravity angle to 270 degrees
B
6
Posts: 16
Reputation: 284


Return to How do I....?

Who is online

Users browsing this forum: Darknessed, FabianB and 44 guests