fly after a double jump

Get help using Construct 2

Post » Thu Nov 21, 2013 2:07 pm

Hi everyone,
I just discovered this great software and just starting to code my plateformer game. At the moment I have my player that can perform a double jump (thanks to the platformer:double jump topic) then I would like my player to settle in the air at the end of my second jump . For that I change the gravity to 0 and I turn on the player's 8 directions behavior and disables the platform user input.

The problem is that my player deviated up without stopping.
I have not found a solution for it until now, so if someone has a solution for a newbie like me, that would be nice ! Thank you!
B
5
S
1
Posts: 29
Reputation: 433

Post » Thu Nov 21, 2013 2:21 pm

a capx would be pretty helpful.

by the way...why should he fly after jumping?? Beaverlicious2013-11-21 14:21:37
Image
Check out our start-up and configure your own helmet in true 3D.
B
44
S
11
G
11
Posts: 1,154
Reputation: 9,988

Post » Thu Nov 21, 2013 7:13 pm

In fact, my character has the ability to fly. The idea is to use the second jump before flying.
For now i try to add a customMovement action but it doesn't change anything
Here is the file:dl.dropboxusercontent.com/u/3523971/TestFly.capx
B
5
S
1
Posts: 29
Reputation: 433

Post » Sun Nov 24, 2013 4:22 pm

Hi,
I finally fund something that works, I just set the platform max fall speed to 0 and let the gravity to default.
I also use both platformer an 8 direction inputs on flying.
The when the player stop flying I change back the max fall speed to default.
That's all!
B
5
S
1
Posts: 29
Reputation: 433

Post » Sun Nov 24, 2013 10:51 pm

@mardock
you could have:

- set the vector Y of the platform behaviour to 0
- disable the platforms behavior
- enable the 8 direction

(just I find the disabling more obvious to understand when coming back to the code, but it is a matter of opinion I guess)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Nov 25, 2013 6:03 pm

Hi,
That's what I have done!
I also create a new instance "FlyAction" to my object so I can get back to the platformer user input if the jump button is pressed again.
B
5
S
1
Posts: 29
Reputation: 433


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 12 guests