semiautomatic airstrafing

Hello world. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending tbodt points.
  • Post: Give tbodt your thoughts on this Script.
  • Vote: Help tbodt win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Stop Lurking!

Sign up

Already a Bananite? Login

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.

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Creators
tbodt
Concept, execution, testing, and everything else

Submitter

tbodt avatar
tbodt Offline
Member Joined 1y

tbodt
Creator
Send a Private Message to the submitter

Game

Category

Attributes

Miscellaneous

Stats

Posts
0
Views
996
Date Added
1y
Date Modified
1y
bcp.crwdcntrl.net tracking pixel