#Auto jumping
1 messages · Page 1 of 1 (latest)
provide context
now did you put the code before?
like i said
yes thats before
should it be exactly there?
yeah?
yeah
anything else or should I test the game now?
try it
k
uh
if I hold space, it doesn't jump.
only when I release it.
so should I change it to getkeydown instead?
then stop thinking
bruh
I'm trying to understand what you're telling me to do.
which often creates misconceptions.
and your also doing random other things
like?
like putting Jump() in getkeyup
comment that too, i dont think you need that, not sure
what does () mean?
thats how you call methods
ok
but why did he make a method called Jump()?
I mean isn't it literally called Jump()?
and not just Jump?
try posting with <> surrounding it
no clue
...
lol what
wheres the GetKeyUp
I changed it to getkeydown.
for what reason
^
I'm confused.
jumping means Jump();
all you want there is make jumpDelay 0
ye
uh now it's the problem again.
as always.
it seems like I can only jump on a specific tick.
or something.
what does that mean
is that jumpCooldown's fault?
I mean
when I press space
it rarely actually jumps.
like on a specific millisecond I believe.
i see why
remove line 131 and 132
//If holding jump && ready to jump, then jump
if (readyToJump && jumping) Jump();
oh and yeah it also autojumps after a while when autojump is off.
ok
still the same.
remove && readyToJump on line 165 and remove the readyToJump = false;
still the exact same.
oh yeah lol
lines 79-96 is what we will change next
if(Input.GetKey(KeyCode.Space)) {
jumpDelay += Time.deltaTime;
}
if(Input.GetKeyDown(KeyCode.Space) && grounded)
{
Jump();
}
if (Input.GetKeyUp(KeyCode.Space)) {
jumpDelay = 0;
}
if(jumpDelay >= 1 && grounded) {
Jump();
jumpDelay = 0;
}
``` just this should work
k
https://pastebin.com/4khNFtAQ code again btw
I'll try that and then go to dinner.
what about the autojump?
the toggle.
dont need it