Upvote Upvoted 0 Downvote Downvoted
Bug with crouch jump script
posted in Customization
1
#1
0 Frags +

I like to jump a lot. And I also like to crouch a lot. That is why this bug is annoying me to no end.

I have a lot of movement related scripts including, null movement, improved crouch jump script, no up jump script (prevents accidental momentum halting stops). I understand how the scripts work and have tried to fix them myself, but being no mastermind it's easy to break them.

The bug
Say I have jumped off a ledge as scout and I am still holding the jump button. The crouch jump script causes me to be crouched in this state. Now if I start press the crouch button and release it. This results in a double jump, which is unintended.
The button sequence goes like this: +jumpB, +crouchB, -crouchB ---> 2nd unintended jump

Here should be all the related scripts:

// Null-cancelling movement script
// (prevents you from pressing two opposing directions, which causes you to stop moving)

bind i +mfwd
bind k +mback
bind j +mleft
bind l +mright

alias +mfwd "-back;+forward;alias checkfwd +forward; alias +checkForwardDepressed; alias -checkForwardDepressed"
alias +mback "-forward;+back;alias checkback +back; alias +unknownError; alias -unknownError"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft; alias +checkLeftDepressed; alias -checkLeftDepressed"
alias +mright "-moveleft;+moveright;alias checkright +moveright; alias +checkRightDepressed; alias -checkRightDepressed"
alias -mfwd "-forward;checkback;alias checkfwd; alias +lastDirection +forward; alias -lastDirection -forward; alias +checkForwardDepressed +unknownError; alias -checkForwardDepressed -unknownError"
alias -mback "-back;checkfwd;alias checkback; alias +lastDirection +back; alias -lastDirection -back; alias +unknownError +checkLeftDepressed; alias -unknownError -checkLeftDepressed"
alias -mleft "-moveleft;checkright;alias checkleft; alias +lastDirection +moveleft; alias -lastDirection -moveleft; alias +checkLeftDepressed +checkRightDepressed; alias -checkLeftDepressed -checkRightDepressed"
alias -mright "-moveright;checkleft;alias checkright; alias +lastDirection +moveright; alias -lastDirection -moveright; alias +checkRightDepressed +noKeysPressed; alias -checkRightDepressed -noKeysPressed"
alias checkfwd
alias checkback
alias checkleft
alias checkright

alias +testKeysPressed +checkForwardDepressed
alias -testKeysPressed -checkForwardDepressed
alias +checkForwardDepressed +unknownError
alias -checkForwardDepressed -unknownError
alias +unknownError +checkLeftDepressed
alias -unknownError -checkLeftDepressed
alias +checkLeftDepressed +checkRightDepressed
alias -checkLeftDepressed -checkRightDepressed
alias +checkRightDepressed +noKeysPressed
alias -checkRightDepressed -noKeysPressed
alias +noKeysPressed +lastDirection
alias -noKeysPressed -lastDirection

//Improved Crouch Jump Script
//By: Chdata
//Thanks to Stabby Stabby
alias +rj2 "spec_mode;-duck;+cr;alias checkrj +cr"
alias -rj2 "-cr;checkduck;alias checkrj"
alias +crouch "-cr;+duck;alias checkduck +duck"
alias -crouch "-duck;checkrj;alias checkduck"
alias checkduck
alias checkrj
alias +cr "+Qjump;+duck"
alias -cr "-duck;-Qjump"
bind alt +rj2
bind b +crouch

alias +crouchjump "+Qjump; +duck"
alias -crouchjump "-duck; -Qjump"
bind "ctrl" "+crouchjump"

//no up jump
alias +Qjump "+testKeysPressed; +jump"
alias -Qjump "-jump; -testKeysPressed"

alias enableQ+ "alias +Qjump "+testKeysPressed; +jump""
alias enableQ- "alias -Qjump "-jump; -testKeysPressed""
alias enable "enableQ+; enableQ-"

Note: I didn't make any of these scripts myself

I like to jump a lot. And I also like to crouch a lot. That is why this bug is annoying me to no end.

I have a lot of movement related scripts including, null movement, improved crouch jump script, no up jump script (prevents accidental momentum halting stops). I understand how the scripts work and have tried to fix them myself, but being no mastermind it's easy to break them.

[b]The bug[/b]
Say I have jumped off a ledge as scout and I am still holding the jump button. The crouch jump script causes me to be crouched in this state. Now if I start press the crouch button and release it. This results in a double jump, which is unintended.
The button sequence goes like this: +jumpB, +crouchB, -crouchB ---> 2nd unintended jump

Here should be all the related scripts:
[code]
// Null-cancelling movement script
// (prevents you from pressing two opposing directions, which causes you to stop moving)

bind i +mfwd
bind k +mback
bind j +mleft
bind l +mright

alias +mfwd "-back;+forward;alias checkfwd +forward; alias +checkForwardDepressed; alias -checkForwardDepressed"
alias +mback "-forward;+back;alias checkback +back; alias +unknownError; alias -unknownError"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft; alias +checkLeftDepressed; alias -checkLeftDepressed"
alias +mright "-moveleft;+moveright;alias checkright +moveright; alias +checkRightDepressed; alias -checkRightDepressed"
alias -mfwd "-forward;checkback;alias checkfwd; alias +lastDirection +forward; alias -lastDirection -forward; alias +checkForwardDepressed +unknownError; alias -checkForwardDepressed -unknownError"
alias -mback "-back;checkfwd;alias checkback; alias +lastDirection +back; alias -lastDirection -back; alias +unknownError +checkLeftDepressed; alias -unknownError -checkLeftDepressed"
alias -mleft "-moveleft;checkright;alias checkleft; alias +lastDirection +moveleft; alias -lastDirection -moveleft; alias +checkLeftDepressed +checkRightDepressed; alias -checkLeftDepressed -checkRightDepressed"
alias -mright "-moveright;checkleft;alias checkright; alias +lastDirection +moveright; alias -lastDirection -moveright; alias +checkRightDepressed +noKeysPressed; alias -checkRightDepressed -noKeysPressed"
alias checkfwd
alias checkback
alias checkleft
alias checkright

alias +testKeysPressed +checkForwardDepressed
alias -testKeysPressed -checkForwardDepressed
alias +checkForwardDepressed +unknownError
alias -checkForwardDepressed -unknownError
alias +unknownError +checkLeftDepressed
alias -unknownError -checkLeftDepressed
alias +checkLeftDepressed +checkRightDepressed
alias -checkLeftDepressed -checkRightDepressed
alias +checkRightDepressed +noKeysPressed
alias -checkRightDepressed -noKeysPressed
alias +noKeysPressed +lastDirection
alias -noKeysPressed -lastDirection

//Improved Crouch Jump Script
//By: Chdata
//Thanks to Stabby Stabby
alias +rj2 "spec_mode;-duck;+cr;alias checkrj +cr"
alias -rj2 "-cr;checkduck;alias checkrj"
alias +crouch "-cr;+duck;alias checkduck +duck"
alias -crouch "-duck;checkrj;alias checkduck"
alias checkduck
alias checkrj
alias +cr "+Qjump;+duck"
alias -cr "-duck;-Qjump"
bind alt +rj2
bind b +crouch

alias +crouchjump "+Qjump; +duck"
alias -crouchjump "-duck; -Qjump"
bind "ctrl" "+crouchjump"


//no up jump
alias +Qjump "+testKeysPressed; +jump"
alias -Qjump "-jump; -testKeysPressed"

alias enableQ+ "alias +Qjump "+testKeysPressed; +jump""
alias enableQ- "alias -Qjump "-jump; -testKeysPressed""
alias enable "enableQ+; enableQ-"
[/code]

Note: I didn't make any of these scripts myself
2
#2
10 Frags +

i think you're over complicating stuff lol

pretty sure that null movement shouldn't conflict with any of the other two

no idea what the fuck no up jump is even supposed to do but it seems useless and it probably messes with the crouchjump script

you could always just play with default keybindings and learn how to play the game normally

scout is the best class in the game im sure you'll be fine

i think you're over complicating stuff lol

pretty sure that null movement shouldn't conflict with any of the other two

no idea what the fuck no up jump is even supposed to do but it seems useless and it probably messes with the crouchjump script

you could always just play with default keybindings and learn how to play the game normally

scout is the best class in the game im sure you'll be fine
3
#3
0 Frags +

I should have been more clear. I don't have a problem with anything else other than crouch jump script and the bug occurs in that alone. I thought showing the other scripts would somehow give a better picture but that makes no sense because they aren't actually directly related.

I use scripts because they make the game more enjoyable for me. I have spazzy movement and I've used crouch jump script since forever and I don't want to relearn my muscle memory.

I should have been more clear. I don't have a problem with anything else other than crouch jump script and the bug occurs in that alone. I thought showing the other scripts would somehow give a better picture but that makes no sense because they aren't actually directly related.

I use scripts because they make the game more enjoyable for me. I have spazzy movement and I've used crouch jump script since forever and I don't want to relearn my muscle memory.
4
#4
0 Frags +

So you occasionally use your second jump when you don't want to. That's kinda weird, for me it's the opposite... Occasionally I will use my second jump and nothing happens, it's just disappeared.

So you occasionally use your second jump when you don't want to. That's kinda weird, for me it's the opposite... Occasionally I will use my second jump and nothing happens, it's just disappeared.
5
#5
0 Frags +

On the topic of crouch jump scripts, how important is it if I use one to get out of this habit? I apparently have weird fingering for wasd (ring finger w, pinky a, middle finger d index on f) but I've played fps games like this forever. I'm thinking I should bind crouch to f at some point since I'm not doing anything with that key but unless the downsides of a crouch jump script are huge I don't think it's that important since I've done fine with it

On the topic of crouch jump scripts, how important is it if I use one to get out of this habit? I apparently have weird fingering for wasd (ring finger w, pinky a, middle finger d index on f) but I've played fps games like this forever. I'm thinking I should bind crouch to f at some point since I'm not doing anything with that key but unless the downsides of a crouch jump script are huge I don't think it's that important since I've done fine with it
6
#6
2 Frags +
NakadaOn the topic of crouch jump scripts, how important is it if I use one to get out of this habit? I apparently have weird fingering for wasd (ring finger w, pinky a, middle finger d index on f) but I've played fps games like this forever. I'm thinking I should bind crouch to f at some point since I'm not doing anything with that key but unless the downsides of a crouch jump script are huge I don't think it's that important since I've done fine with it

really depends on which class you main and how much you care about taking the time to learn it
I'd say there's no downside in binding f to crouch but you could also bind it to mouse2 (for some classes at least, of course not medic or sniper)
imo its a lot easier to ctap with mouse2 than with control or shift bound to +duck, but if you don't main soldier or don't care much about jumping (crouchjump scripts also inhibit you from doing certain bounces and bhops but that doesnt matter to 99% of people)

[quote=Nakada]On the topic of crouch jump scripts, how important is it if I use one to get out of this habit? I apparently have weird fingering for wasd (ring finger w, pinky a, middle finger d index on f) but I've played fps games like this forever. I'm thinking I should bind crouch to f at some point since I'm not doing anything with that key but unless the downsides of a crouch jump script are huge I don't think it's that important since I've done fine with it[/quote]
really depends on which class you main and how much you care about taking the time to learn it
I'd say there's no downside in binding f to crouch but you could also bind it to mouse2 (for some classes at least, of course not medic or sniper)
imo its a lot easier to ctap with mouse2 than with control or shift bound to +duck, but if you don't main soldier or don't care much about jumping (crouchjump scripts also inhibit you from doing certain bounces and bhops but that doesnt matter to 99% of people)
7
#7
4 Frags +

That thing's a mess.

At risk of not breaking anything (I don't know why half that script is there but I'm not going to argue incase it somehow does do something), this hotfix should work (though you really should look into getting a better script because at least half of this has gotta be pointless bloat):

Show Content
alias none ""

alias +rj2 "spec_mode;-duck;+cr;alias checkrj +cr"
alias -rj2 "-cr;checkduck;alias checkrj"
alias +crouch "+crouchmid"
alias -crouch "-crouchmid"
alias +crouchmid "-cr;+duck;alias checkduck +duck"
alias -crouchmid "-duck;checkrj;alias checkduck"
alias checkduck
alias checkrj
alias +cr "+jump;+duck"
alias -cr "-duck;-jump"
bind alt +rj2
bind b +crouch

alias +crouchjump "+Qjump; +duck"
alias -crouchjump "-duck; -Qjump"
bind "ctrl" "+crouchjump"

//no up jump
alias +Qjump "+testKeysPressed; +jump; alias +crouch none; alias -crouch none"
alias -Qjump "-jump; -testKeysPressed; alias +crouch +crouchmid; alias -crouch -crouchmid"

alias enableQ+ "alias +Qjump "+testKeysPressed; +jump""
alias enableQ- "alias -Qjump "-jump; -testKeysPressed""
alias enable "enableQ+; enableQ-"

Basically just make it so that the crouch bind does nothing while jump is held. Big risk is if +/-cr needs to actually point to +/-Qjump for some reason, but I don't think it does and for that matter have no clue what cr is actually there for when everything that points to it can already just run those commands anyway.

That thing's a mess.

At risk of not breaking anything (I don't know why half that script is there but I'm not going to argue incase it somehow does do something), this hotfix should work (though you really should look into getting a better script because at least half of this has gotta be pointless bloat):
[spoiler]alias none ""

alias +rj2 "spec_mode;-duck;+cr;alias checkrj +cr"
alias -rj2 "-cr;checkduck;alias checkrj"
alias +crouch "+crouchmid"
alias -crouch "-crouchmid"
alias +crouchmid "-cr;+duck;alias checkduck +duck"
alias -crouchmid "-duck;checkrj;alias checkduck"
alias checkduck
alias checkrj
alias +cr "+jump;+duck"
alias -cr "-duck;-jump"
bind alt +rj2
bind b +crouch

alias +crouchjump "+Qjump; +duck"
alias -crouchjump "-duck; -Qjump"
bind "ctrl" "+crouchjump"

//no up jump
alias +Qjump "+testKeysPressed; +jump; alias +crouch none; alias -crouch none"
alias -Qjump "-jump; -testKeysPressed; alias +crouch +crouchmid; alias -crouch -crouchmid"

alias enableQ+ "alias +Qjump "+testKeysPressed; +jump""
alias enableQ- "alias -Qjump "-jump; -testKeysPressed""
alias enable "enableQ+; enableQ-"[/spoiler]
Basically just make it so that the crouch bind does nothing while jump is held. Big risk is if +/-cr needs to actually point to +/-Qjump for some reason, but I don't think it does and for that matter have no clue what cr is actually there for when everything that points to it can already just run those commands anyway.
8
#8
0 Frags +

Thanks JarateKing, now it works perfectly. Also your huds are cool

Thanks JarateKing, now it works perfectly. Also your huds are cool
Please sign in through STEAM to post a comment.