Toggle Walk Commands
Azrael2709
Join Date: 2003-05-27 Member: 16760Members
<div class="IPBDescription">help needed</div> Ok, I have my keyboard set up so space bar is jump, shift is duck, and ctrl is walk. I find it really uncomfortable to hold down ctrl while cloak walking. So im asking: is there a way to bind a button (ctrl) to toggle walking on and off? So iI press ctrl, and any movement I do is just walking. Then I press ctrl again and I can run again? Can this be done with console commands? Thanks.
Comments
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
alias dowalk "+speed; bind X dorun"
alias dorun "-speed; bind X dowalk"
bind X "dowalk"
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
That should do it
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
alias walky "walk_on"
alias walk_on "alias walk_off +speed; alias walky walk_off"
alias walk_off "alias walk_on -speed; alias walky walk_on"
bind "ctrl" "walky" <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I forget how steam handles custom configs...I think you need to make a new config called "userconfig.cfg" but Im not sure.
Where do you people make up these aliases? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
Mine:
//Toggleduck
alias toggleduck "duck_on"
alias duck_on "alias toggleduck duck_off; +duck"
alias duck_off "alias toggleduck duck_on; -duck"
//Togglewalk
alias togglewalk "walk_on"
alias walk_on "alias togglewalk walk_off; +speed"
alias walk_off "alias togglewalk walk_on; -speed"
//Togglejump
alias togglejump "jump_on"
alias jump_on "alias togglejump jump_off; +jump"
alias jump_off "alias togglejump jump_on; -jump"
Walk is good fer being cloaked (duh), jump is for gliding as a lerk (my thumb gets tired, ok?), and duck is for when you don't want to stick to walls as a skulk (not often, though sometimes I use it to fall off walls and make sure I don't stick on the way down).
But hey, whatever works for you, right? <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html//emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif' /><!--endemo-->
Walk on, walk off, walk on, walk off.
alias walk_toggle "walk_on"
alias +walk_hold "+speed"
alias -walk_hold "-speed"
alias walk_on "alias walk_toggle walk_off;alias +walk_hold -speed;alias -walk_hold +speed;+speed"
alias walk_off "alias walk_toggle walk_on;alias +walk_hold +speed;alias -walk_hold -speed;-speed"
alias duck_toggle "duck_on"
alias +duck_hold "+duck"
alias -duck_hold "-duck"
alias duck_on "alias duck_toggle duck_off;alias +duck_hold -duck;alias -duck_hold +duck;+duck"
alias duck_off "alias duck_toggle duck_on;alias +duck_hold +duck;alias -duck_hold -duck;-duck"
You must bind to 'walk_toggle', '+walk_hold', 'duck_toggle' & '+duck_hold'
The aliases I used there are actually part of a larger metabind setup I use, which basically does the same thing as you wrote. Basically how it works is that i've got a key for ducking, a key for jumping, a key for walking, and a key for toggle walking (capslock <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->). But if I hold my key for walking (shift), and hit my duck or jump keys, it toggles that action. Its pretty handy actually, keeps the keyboard a little cleaner I find. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->