Press-and-hold crouch toggle

A Config Script for Team Fortress 2

Members see zero ads. Membership is 100% free
55 1,617 bytes 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//----------------------------------------------------------------------------
//      Team Fortress 2
//      Press-and-hold crouch toggle
//
//      sixx, april 2019
//
//      Press-and-hold crouch bind to toggle crouch
//          always-on or off [default].
//
//      // USAGE
//
//      Press and hold crouch bind to lock crouch on --
//          release the bind and you'll remain crouched.
//
//      Press and release bind to unlock crouch.
//
//      Quickly pressing and releasing bind functions
//          like game default.
//
//      // SETTINGS
//
//      Set key bind on line 44,
//          script default is Ctrl
//
//      Set toggle delay on line 32,
//          script default is 250.
//----------------------------------------------------------------------------

alias +duckt        "dt_set"
alias -duckt        "dt_reset"

alias dt_set        "+duck; alias dt_exec dt_setB; alias dt_reset dt_resetB; wait 250; dt_exec"
alias dt_setB       "alias dt_reset; alias +duckt dt_unset"

alias dt_unset      "alias dt_reset dt_resetB; alias +duckt dt_set"

alias dt_exec       // "dt_setB"

alias dt_reset      // "dt_resetB"
alias dt_resetB     "alias dt_exec; -duck"

// overwrite current crouch bind
// bind "Shift"     "+duckt"
bind "Ctrl"         "+duckt"


//--------------------
//  Simple wait test
//      Must be connected to a server to work.
//
//      If the server does not have wait enabled,
//      the bind reverts to normal +duck action.
//--------------------
alias wait          "alias +duckt +duck; alias -duckt -duck"
wait

Team Fortress 2 Press-and-hold crouch toggle

Press-and-hold crouch bind to toggle crouch
    always-on or off [default].

Usage

Press and hold crouch bind to lock crouch on --
    release the bind and you'll remain crouched.

Press and release bind to unlock crouch.

Quickly pressing and releasing bind functions
    like game default.

Notes

This script may not be very useful in-game.

This code will need to be added to a character config,
    such as sniper.cfg.

Embed

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

Credits

Original Author
tf2sixx
tf2sixx Joined 3mo ago
Offline
168 points Ranked 57940th

Submitter

tf2sixx avatar
tf2sixx Joined 3mo ago
Offline
168 points Ranked 57940th
tf2sixx
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

License

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 0
  • 820
  • 4
  • 2mo

More from Submitter

More Action Scripts Scripts