If you want to still jump after leaving a ledge and coyote time, but penalize their jumps (ex: you have 2 max jumps, we penalize them 1 jump, so we will still get a jump but only 1.) add a variable called AirJumpPenalty into the constants and add this code in HandleJump() after the coyote timer if statement. if ((jumps
great video. if you export the values you can update them on the fly and your iteration time might be faster, as far as honing in your final values. Or additionally, you might want some of that hang time and things like that for different abilities or skills, maybe an item that lets you hover, or something, and you could then knock them all out really quickly. But yeah, this seems like a solid approach.
That was awesome ! The instructions are so clears it make me want to try to experiment with the code to have other mechanics (I'm thinking of falling slower if the player keep the jump button pressed or something like these mechanics we find in Super Mario Wonder). That's great tutorials !
if I follow ur variables and inputs can i build it with visual script (no code experience yet) or may be just use both visual script and code together to apply
I'm having a problem with the Jump Input Buffering, and while testing it discovered something else: I'm really new with Godot and coding in general, so maybe there is something i'm not seeing. The first problem is with the JumpBuffering: It works always, the timer starts but when it reachs 0 starts again. So it doesn't matter when i press it. if i'm in the air as soon as it touches the floor it will jump again. I tried to create a code that stops the timer when it reaches 0, but it didn't work. And the second problem is that i can jump while i'm falling if i didn't jump firs. If i fall from a platform i can jump midair. And these both problems happen at the same time. if I fall from a platform and jump, I will jump midair and when i touch the floor will jump again.
In your JumpBuffer timer node, is auto start checked? Auto start needs to be disabled otherwise the timer will continuously start and register as the input being buffered. Make sure the coyote timer also has auto start disabled.
@@BiLLzDevs First of all: Thanks for the answer. I didn't start with the coyote timer, i want to make sure that everything is working properly before moving to the next step. The Timer's autostart was alredy disabled, but it restarts anyway. Well. By writting this comment I find out a way to kind of solve it. i'm pretty sure that there is a better way to do this but i don't have the knowledge to find it yet. So, i wrote a way to stop the countdown when it reaches a really low value on the HandleJumpBuffer func. And by rising the timer the same time it takes it should work the same way. if (JumpBufferTimer.time_left < 0.03): JumpBufferTimer.stop() Now, it also solved (don't know why) the problem that if i jump midair while falling it will jump again AND start the timer. It still jumps, but it doesn't start the timer anymore. the remaining problem is that jump. i want the character to jump only if it's on the floor, that's easy at this point. but if i add an extra jump that doesn't work. I used the code that Brochlark said for the penalty and it worket for 2 jumps (even if it says MaxJumps = 1). And it can double Jump only if i jump from the floor and a single jump if i fall from a platform. I feel at this point that i'm doing a mess with the code. At the end with the HandleJump it ended like this: func HandleJump(): if ((!is_on_floor() and (jumps 0)) and (jumps < MaxJumps)): if ((jumps
Seems like you have kinda got it sorted out! If you keep running into issues, the source code is available on my itch.io page that is linked in the description. You can use that to make sure you have everything set up properly
for anyone who still gets this problem with "Autostart" disabled (like me), just make sure the box for "One Shot" is enabled in the Jump Buffer Timer's node properties in the inspector
Can you make video entirely dedicated to how to create state machines the way u done here 😊 for 2d anf 3d game and please do video how to create 3d world by grid map no videos are sufficient to understand these concepts in depth
I do have a video dedicated to the state machine used in this video. Unfortunately, I haven’t done any work in 3D so I don’t know if I would be any help with that, sorry!
Love this tutorial, seemed to fix the issue i was having after the last episode. However, my character is now able to double jump but only after a coyote jump, any ideas?
If you want to still jump after leaving a ledge and coyote time, but penalize their jumps (ex: you have 2 max jumps, we penalize them 1 jump, so we will still get a jump but only 1.)
add a variable called AirJumpPenalty into the constants and add this code in HandleJump() after the coyote timer if statement.
if ((jumps
Love the mechanic and the solution you came up with, thanks for sharing it!
Yup that's right, I did something similar to this and it works perfectly.
Finally a jump video that explains it in a way I can understand, 10/10 video!
great video. if you export the values you can update them on the fly and your iteration time might be faster, as far as honing in your final values. Or additionally, you might want some of that hang time and things like that for different abilities or skills, maybe an item that lets you hover, or something, and you could then knock them all out really quickly. But yeah, this seems like a solid approach.
Agreed! Exporting is a fantastic way to quickly adjust values and fine tune a jump
Very informative. Imo the feel of character movement is often something that gets overlooked.
That was awesome ! The instructions are so clears it make me want to try to experiment with the code to have other mechanics (I'm thinking of falling slower if the player keep the jump button pressed or something like these mechanics we find in Super Mario Wonder).
That's great tutorials !
Go do some experimentation, it’s a great way to learn and reinforce programming skills!
Thanks for the insight, man!
i did it, it works pretty good! Thanks for tutorial!😊
You're welcome!
@2:20 No need state machine, just check if velocity is positive or negative.
True, you could do it that way but I feel the logic is cleaner and more compartmentalized in a state machine 🤷🏼♂️
Great detailed explanation. Thank you
You're very welcome!
This is awesome thank you.
You're very welcome!
if I follow ur variables and inputs can i build it with visual script (no code experience yet) or may be just use both visual script and code together to apply
I am unfamiliar with any visual scripting extensions in Godot, but you should be able to implement this in it
I'm having a problem with the Jump Input Buffering, and while testing it discovered something else:
I'm really new with Godot and coding in general, so maybe there is something i'm not seeing.
The first problem is with the JumpBuffering: It works always, the timer starts but when it reachs 0 starts again. So it doesn't matter when i press it. if i'm in the air as soon as it touches the floor it will jump again.
I tried to create a code that stops the timer when it reaches 0, but it didn't work.
And the second problem is that i can jump while i'm falling if i didn't jump firs. If i fall from a platform i can jump midair.
And these both problems happen at the same time. if I fall from a platform and jump, I will jump midair and when i touch the floor will jump again.
In your JumpBuffer timer node, is auto start checked? Auto start needs to be disabled otherwise the timer will continuously start and register as the input being buffered. Make sure the coyote timer also has auto start disabled.
@@BiLLzDevs First of all: Thanks for the answer.
I didn't start with the coyote timer, i want to make sure that everything is working properly before moving to the next step. The Timer's autostart was alredy disabled, but it restarts anyway.
Well. By writting this comment I find out a way to kind of solve it.
i'm pretty sure that there is a better way to do this but i don't have the knowledge to find it yet. So, i wrote a way to stop the countdown when it reaches a really low value on the HandleJumpBuffer func. And by rising the timer the same time it takes it should work the same way.
if (JumpBufferTimer.time_left < 0.03):
JumpBufferTimer.stop()
Now, it also solved (don't know why) the problem that if i jump midair while falling it will jump again AND start the timer.
It still jumps, but it doesn't start the timer anymore.
the remaining problem is that jump. i want the character to jump only if it's on the floor, that's easy at this point. but if i add an extra jump that doesn't work.
I used the code that Brochlark said for the penalty and it worket for 2 jumps (even if it says MaxJumps = 1). And it can double Jump only if i jump from the floor and a single jump if i fall from a platform.
I feel at this point that i'm doing a mess with the code. At the end with the HandleJump it ended like this:
func HandleJump():
if ((!is_on_floor() and (jumps 0)) and (jumps < MaxJumps)):
if ((jumps
Seems like you have kinda got it sorted out! If you keep running into issues, the source code is available on my itch.io page that is linked in the description. You can use that to make sure you have everything set up properly
for anyone who still gets this problem with "Autostart" disabled (like me), just make sure the box for "One Shot" is enabled in the Jump Buffer Timer's node properties in the inspector
@ Exactly!
Can you make video entirely dedicated to how to create state machines the way u done here 😊 for 2d anf 3d game and please do video how to create 3d world by grid map no videos are sufficient to understand these concepts in depth
I do have a video dedicated to the state machine used in this video. Unfortunately, I haven’t done any work in 3D so I don’t know if I would be any help with that, sorry!
Love this tutorial, seemed to fix the issue i was having after the last episode. However, my character is now able to double jump but only after a coyote jump, any ideas?
@@cj-cv7zv interesting… mine works on the ground. What does your HandleJump function look like?
yours links doesn't work :(
I just fixed them for you
What's the point to show the code and not the final result?
What do you mean final result?
@@BiLLzDevs nah fr wat th hell is he saying