[SOLVED] How do I make my platformer character... fly?

Get help using Construct 2

Post » Tue May 26, 2015 11:05 pm

Making a platformer character is very easy with Construct, however I still didn't find a way to make it fly.

In the case, my character is an anthropomorphic bat character. She has wings to help her in some parts, where in others they will be necessary.

The idea is to jump, then press and hold the jump button while falling to make her stop and float in air. While flying, you can hold up or down to make her fly upward or downward.

Of course she won't be flying forever, there will be a gauge for this.

So I count with you guys. Could someone help me with my problem. Independent of the answers, I thank you for your attention. ^^
Last edited by MintyMousyXFCE on Fri May 29, 2015 1:30 pm, edited 1 time in total.
B
6
S
2
G
1
Posts: 13
Reputation: 551

Post » Wed May 27, 2015 4:05 am

I think the approach would be to apply another movement behavior to the character like "Custom Movement".

When the button is "is Touching" or "on hold" rather than "on objected touched" you can trigger a custom movement and possibly use "accelerate towards position". You'll have to play around with the specifics.

Hope this helps...
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Wed May 27, 2015 7:19 am

Like @TheDom says..

It would be a case of disabling the platform behaviour on button press/hold while falling and enabling another movement-behaviour..
What behaviour you'd like for this is totally up to you..
Using bullet behaviour with gravity might be nice, but you could always add a fake gravity to any of the other behaviours..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 7:59 am

Here you go mate , enjoy!

Arrows to move and jump
While you jump, press and keep down W, then use Arrows to fly around, if you release W player comes to normal platformer mode.


Download did this in 2 minutes while reading your post! :)


used this behaviors, Sine,Platformer,Pin,8way,Keyboard
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,958

Post » Wed May 27, 2015 3:53 pm

Thank you you guys for the answers, and specially for gamecorpstudio for the engine example. :)

Well, it really works. I just hope people wouldn't feel anti-professional when you press and hold jump in the first chance and make the character fly when she's falling.

Also, it's really cool the sinewave movement, it gives a more fluid feeling when you're flying. The only problem is, when you stop flying, if the wave is moving down, it makes the character fall like an anvil.

But checking again, it's also the thing with the 8-way movement.

Is there a solution for these minor problems? Once again, I thank you for your help, my friends. :)
Last edited by MintyMousyXFCE on Wed May 27, 2015 4:09 pm, edited 1 time in total.
B
6
S
2
G
1
Posts: 13
Reputation: 551

Post » Wed May 27, 2015 3:55 pm

Just another thing I forgot to mention, it works good with regular platforms, but not so good with slopes, inclined platforms. Maybe it's because of the 8-way movement.

EDIT: I was able to prevent the "super weight" problem when the flight is turn off. It was something involving the Y vector of the platform movement. All I did was to set it to 0 once you release the jump button, and voilá! Worked like a charm. :)

EDIT 2: Another thing is, sometimes when you stop flying, the character kinda "bounces" to a certain direction.
B
6
S
2
G
1
Posts: 13
Reputation: 551

Post » Wed May 27, 2015 8:14 pm

@gamecorpstudio Thanks for sharing
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Wed May 27, 2015 8:56 pm

TheDom wrote:@gamecorpstudio Thanks for sharing



your welcome,sorry didn't read your post, now i see is the same thing what you said, dident read your post before :)) h aha we where thinking on same thing :)


most of times, i just read the first topic, and last if its not solved, i post my own version, so i just skip peoples posts :))


MintyMousyXFCE wrote:Just another thing I forgot to mention, it works good with regular platforms, but not so good with slopes, inclined platforms. Maybe it's because of the 8-way movement.

EDIT: I was able to prevent the "super weight" problem when the flight is turn off. It was something involving the Y vector of the platform movement. All I did was to set it to 0 once you release the jump button, and voilá! Worked like a charm. :)

EDIT 2: Another thing is, sometimes when you stop flying, the character kinda "bounces" to a certain direction.



Edit 2 yea noticed that, it was a sine behavior i added to the character wanted to try something. but then forgot to remove it



i think for the slops and falling its all fixed now in the v2 capx.



here is a fixed capx better then that i cant do, but you could try using physics based movement and flyng i think wold work better Downloadv2
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,958

Post » Fri May 29, 2015 1:21 pm

@gamecorpstudio Thank you again for all the help. :)

I was working in my own version, but I was struggling to fix some bugs. I used the two examples you provided and merged into my project.

If you guys are interested in see the result, you may download it here: (Unable to attach any file due some weird problem nor post any link due to my low reputation.)

Arrows move, Z jump. To fly, jump, release the jump and then press and hold the jump button to fly. If you're falling, you can simply hold the jump button.

This little delay is necessary to not interfere too much with the regular jumps.

This problem is solved and I shall change the title to show it. Thank you everyone, for all the help and suggestions. :D
B
6
S
2
G
1
Posts: 13
Reputation: 551

Post » Fri May 29, 2015 2:09 pm

no problem, you can upload if you want an arcade demo of your game if you want for people reviews and feedback's :D happy that you solved it in end ! :D
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,958

Next

Return to How do I....?

Who is online

Users browsing this forum: Euduardo, ST314 and 31 guests