Skip to content

Instantly share code, notes, and snippets.

@BlackCetha
Last active June 4, 2023 16:54
Show Gist options
  • Save BlackCetha/0ae81a05d07404c31c75 to your computer and use it in GitHub Desktop.
Save BlackCetha/0ae81a05d07404c31c75 to your computer and use it in GitHub Desktop.
Null cancelling movement script (source games)
bind w +mfwd
bind s +mback
bind a +mleft
bind d +mright
alias +mfwd "-back;+forward;alias checkfwd +forward;"
alias +mback "-forward;+back;alias checkback +back;"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft;"
alias +mright "-moveleft;+moveright;alias checkright +moveright;"
alias -mfwd "-forward;checkback;alias checkfwd none;"
alias -mback "-back;checkfwd;alias checkback none;"
alias -mleft "-moveleft;checkright;alias checkleft none;"
alias -mright "-moveright;checkleft;alias checkright none;"
alias checkfwd none
alias checkback none
alias checkleft none
alias checkright none
alias none ""
bind "SPACE" "+jump"
bind "ctrl" "+duck"
@Alexeysey
Copy link

when i press a and d at the same time, it goes for another side(e.g. I hold a, then hold d and im going to right)
Any solution?

@augstsh
Copy link

augstsh commented Jan 18, 2023

thats the point lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment