flapadiddle

Null-cancelling movement script

Mar 5th, 2015
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. // Null-cancelling movement script
  2. // (prevents you from pressing two opposing directions, which causes you to stop moving)
  3.  
  4. bind w +mfwd
  5. bind s +mback
  6. bind a +mleft
  7. bind d +mright
  8.  
  9. alias +mfwd "-back;+forward;alias checkfwd +forward"
  10. alias +mback "-forward;+back;alias checkback +back"
  11. alias +mleft "-moveright;+moveleft;alias checkleft +moveleft"
  12. alias +mright "-moveleft;+moveright;alias checkright +moveright"
  13. alias -mfwd "-forward;checkback;alias checkfwd none"
  14. alias -mback "-back;checkfwd;alias checkback none"
  15. alias -mleft "-moveleft;checkright;alias checkleft none"
  16. alias -mright "-moveright;checkleft;alias checkright none"
  17. alias checkfwd none
  18. alias checkback none
  19. alias checkleft none
  20. alias checkright none
  21. alias none ""
Add Comment
Please, Sign In to add comment