• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Making the player character move faster in the air? <SOLVED>

M

marioman237

Guest
I'm making a platformer, and I'm wondering if it is possible to make the character faster while airborne.
 
D

DekuNut

Guest
Well first you would need to post the current code you use to move your character. There are MANY ways to do it, and we don't know which way you've gone about it.
 
M

marioman237

Guest
upload_2018-12-1_17-50-18.png
^ Used for running to the right
upload_2018-12-1_17-45-34.png
^ Used for ground collision
 

Slyddar

Member
You have done the hard work, as you have a variable called grounded, so now you can just adjust the speed when grounded = 1. Set a variable definition where you define 2 variables for speed, say spd_ground = 4 and spd_air = 6. Now in the section where you have the Set Speed block and are setting it to 4, instead change it to an If Variable block, where you ask if grounded is true. If it is true, set Set Speed to spd_ground, else Set Speed to spd_air.

02-12-2018 10-03-41 AM.png
 
M

marioman237

Guest
Thank you so much! It worked. Now I can focus on level design.
 
Top