Flipping gravity, inverted controls

Get help using Construct 2

Post » Fri Dec 02, 2011 9:03 am

Hello!

I've been trying to solve this issue for a few days now, but i cant seem to figure it out. I'll try to keep it short and understandable!

The player object uses the platform behaviour, and this works as intended. I've implemented a feature that flips/inverts the gravity when a button is pressed down, and goes back to normal platform behaviour if the button is released.

Everything works fine, except that the controls of the player object while "flipped", gets inverted. I.e; when pressing right arrow while flipped, the player moves to the left. Jumping and animations seem to work.

Here is the events.



Some solutions i thought about was to use simulate controls, with custom events regarding the controls. I tried this, but it resulted in not being able to jump somehow, and would require me to redo the events that handles certain animation triggers.

I've also been fooling around with lots of different events and actions within the flipped state, but nothing seem to work.

Any tips or directions are welcome!Era2011-12-02 09:04:18
B
34
S
11
G
9
Posts: 189
Reputation: 8,595

Post » Fri Dec 02, 2011 12:38 pm

I've made this example. While in the air press up/down arrows to change the gravity. It should be also easy to add left/right gravity.
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Fri Dec 02, 2011 2:35 pm

[QUOTE=Noga] I've made this example. While in the air press up/down arrows to change the gravity. It should be also easy to add left/right gravity.[/QUOTE]

Thank you kind sir. Appreciate it! A nice twist to it, would never have thought of that.
B
34
S
11
G
9
Posts: 189
Reputation: 8,595


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Braus and 2 guests