Help with something simple I bet.
-
I have no clue how to make gravity what I was doing was using playerS.y += 5 which acts as the downward force but then when I make a jump with a I can just keep jumping I use if c.a then playerS.y -=20 endif that's my jump code how do I tell it to stop jumping if not on the ground?
-
so this might be kinda difficult for me to explain but here i go,
so you already have playerX and playerY positions i assume. so what you need next is a velocity variable. next you need a boolean variable (true or false) to say if the player is on the ground or not. if the player is on the ground, then the boolean variable would be true resetting the velocity to 0. however, if the boolean variable is false, then each loop, the velocity has lets say a gravity force of 1 added to it. the velocity variable is the one that controls how high the player jumps. when the player jumps, you add a negative number to the velocity.i hope that makes sense as im horrible at explaining things. if not, im sure someone else can explain it better
-
@poof92 use the tutorial in the help section, you need an oldstate for the button so it resets when you release it. hope this helps
-
The theme of the first Game Jam was "Jump". There must be something in here that can help!
https://fuzearena.com/forum/topic/751/fuze-game-jam-1-entry-list