This tutorial hasn't been translated.
This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.
Hello guys! Today I’ll be showing you an easy concept for Anti-Gravity in Construct 2. This allows you to flip around Gravity, so all you players and creatures will do everything upside-down! This concept could be used in Puzzle Platform games. Now, read on!
First you will need a basic platform game set-up, with some solids and a Player.
Once you have something like this, add the ‘Mouse’ object. In the Event sheet, enter this condition and event.
Now let’s break this down.
The condition just sets a trigger to reverse gravity. In this case it’s a click of the mouse, but it could be something else, like finding an object or pressing the space-bar.
The Events are also simple. The first event sets Gravity to normal or 1500 pixels per second. It also sets the Players angle to be normal, like your Player normally looks. The next event swaps gravity.
If you set your Player Gravity to minus 1500, then your Player is still pulled by gravity, but upwards. This makes a nice effect where your Players Physics is all normal, but upside-down.
And make sure you set your Player angle to 180 when in Anti-Gravity. This makes your Player look upside-down, and so it makes sense.
Also, make sure if you have any NPC’s or monsters or creatures, they all go through the same treatment. Just make sure they have the ‘Physics’ behavior to make it work.
That’s it! Have fun messing with this technique, and I hope you learnt something from this tutorial! Good-night!