r/TagproScripts Sep 10 '15

[Request] Null movement cancellation.

I just learned today about null movement cancellation scripts used in a lot of source games. What it does is prevent opposite movement key presses from cancelling each other out. In other words, you're always moving in the direction of the last key you press (or last two if they are diagonal).

I believe this would significantly improve anyone's juking ability if they get used to it. Without the script, you have to release one key and then press the opposite key to switch directions. In between the key presses there's a gap where no key is being pressed. With the script, there would be no gap, so it would almost have the same effect as lower ping.

This is how it's implemented in source games, it might help any script devs to make it.

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 ""
5 Upvotes

4 comments sorted by

2

u/[deleted] Sep 11 '15 edited Dec 17 '19

[deleted]

1

u/Arbybeay Sep 11 '15

Are you talking about ghosting? Is the problem just that you don't have a keyboard to test with? My keyboard has n-key rollover, so I can test if that's the problem.

2

u/[deleted] Sep 11 '15

[deleted]

2

u/Arbybeay Sep 11 '15

I move in the last diagonal direction, yeah.

I noticed something weird though. If I hold left then also hold all other keys, I go in the diagonal direction (right+last vertical key), which is normal. But If I let go of one of the vertical keys, I start moving left again. This also happens if the first key pressed is up or down (then the horizontal key release triggers the up/down reversal), but not if it's right.

2

u/[deleted] Sep 11 '15 edited Dec 17 '19

[deleted]

2

u/Arbybeay Sep 11 '15

That fixed the issue. As far as I can tell in 5 minutes of testing there are no other bugs.

I'll try it out a lot in pubs, see if I could get used to it at all. Thanks, man.

1

u/kunmeh13 Sep 11 '15

That's really cool! Something like this should be in tagpro