#Jumping

1 messages · Page 1 of 1 (latest)

thorny root
#

i tried to do jumping but i don't know how to make it so the player cannot jump more than once

bronze cedar
#

you should use a boolean instead i think? i am not sure

dry slate
#

You're missing the "if" in between so that it can tell if you are pressing space or not.
The bool that comes out of getkey says wether or not you are currently pressing the space key
Also, you dont need to plug in the get key to the flow, you can just pull the bool from it like in the image, but i dont think it has any effect besides looking different/better

thorny root
dry slate
#

fair enough xd

sage raptor
#

I think at least

#

The if statement might still be used but check for the once node

thorny root
#

But it is the code for jumping. I wanted to make it so i can jump once and when i touch floor it resets

bronze cedar
#

you mean cannot jump while in the air?

sullen canyon
#

You normally raycast or circlecast for ground to find out if you're on the ground, only then you are allowed to jump