semiautomatic airstrafing

A Config Script for Portal 2

35 lines | 2 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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
This script can be useful for airstrafing and bunnyhopping, especially on a laptop where you can't scroll and move the mouse at the same time.

To bunnyhop, turn on strafelooking and scroll while strafing back and forth. Looking back and forth happens automatically. I think you can airstrafe just by strafing back and forth, although I haven't tried it.

To install, copy the code into a file called strafelooking.cfg in portal2/cfg. Or download the file from the GitHub Gist and put it in the same place. Then bind some keys to +strafelooking and toggle_strafelooking as described in the script's comments.
Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Creators
tbodt
Concept, execution, testing, and everything else

Submitter

tbodt avatar
tbodt Joined 3y ago
Offline

tbodt
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

License

Attributes

Miscellaneous

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+
  • 2.2k Views
  • 3ySubmitted
  • 3yModified

Scores

  • Not yet rated
Sign up to access this!

More Other/Misc Scripts

bcp.crwdcntrl.net tracking pixel