Last active
June 9, 2016 22:28
-
-
Save tbodt/bf5c8daf9be59ee1b818f13ead8c697f to your computer and use it in GitHub Desktop.
Semiautomatic airstrafing for Portal 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Semiautomatic airstrafing (strafelooking) script by tbodt. | |
// When strafelooking is enabled, the strafe keys (a and d) will turn the camera and strafe at the same time. | |
// When it is disabled, they behave normally. | |
// | |
// Keybinding configuration: | |
// Bind a key to +strafelooking to turn on strafelooking while it is held down. | |
// Bind a key to toggle_strafelooking to toggle strafelooking when you press it. | |
// I use this configuration: | |
// bind tab toggle_strafelooking | |
// bind ctrl +strafelooking | |
// I have shift bound to crouch and control mapped to the caps lock key, so control is best for me. Choose what you want. | |
// | |
// Copyright © 2016 Theodore Dubois. All rights reserved. | |
// The latest version can always be found at https://gist.github.com/tbodt/bf5c8daf9be59ee1b818f13ead8c697f. | |
alias setlook_right -left | |
alias setlook_right -right | |
alias setlook "setlook_left;setlook_right" | |
alias stoplook "-left;-right" | |
alias +strafe_left "+moveleft;-moveright;alias setlook_left +left" | |
alias -strafe_left "-moveleft;alias setlook_left -left" | |
alias +strafe_right "+moveright;-moveleft;alias setlook_right +right" | |
alias -strafe_right "-moveright;alias setlook_right -right" | |
alias +strafelook_left "+strafe_left;setlook" | |
alias -strafelook_left "-strafe_left;setlook" | |
alias +strafelook_right "+strafe_right;setlook" | |
alias -strafelook_right "-strafe_right;setlook" | |
alias +strafelooking "setlook;bind a +strafelook_left;bind d +strafelook_right;alias toggle_strafelooking -strafelooking" | |
alias -strafelooking "stoplook;bind a +strafe_left;bind d +strafe_right;alias toggle_strafelooking +strafelooking" | |
-strafelooking | |
cl_yawspeed 90 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment