BindToggle

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Nothing on the VDC Wiki. How do you use this command?
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
It works with cvars which are 0/1 boolean values, and automagically changes it to whatever it currently isn't.

Code:
bind u "bindtoggle sv_cheats"
Each time you depress the button, the sv_cheats state should flip.

"Incrementvar" is also handy, taking min/max/step arguments like a little for-loop.
Code:
bind u "incrementvar mat_wireframe 0 3 1
Should cause mat_wireframe to increase by 1 for each press, with 0-3 being the min/max. When it goes past the max it loops back to the minimum.
 
Last edited:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Awesome. Thanks. I've also bounded wireframe on and off to seperate keys. :p You should add this information to this page.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I'll go ahead and toss something up when I get home and can be 100% sure I'm writing accurate descriptions ;)
 

RavenStryker

Former Alias: †Blade†/Xi.Cynx
aa
Nov 25, 2008
782
844
I made what you would call a "script", at least that what a lot of people would call it. I call it ease on the classes. One for spy and engineer to use the "f buttons" to do certains thigns faster as opposed to going through multiple screens. and it only loads when i select that character. =) ex:

bind f1 "disguise 1 1" //Scout
bind f2 "disguise 3 1" //Soldier
 

Ðїαмøп∂Ðøvαн

L1: Registered
Jul 31, 2013
1
0
Hey guys, I've been trying to use the bindtoggle command to toggle addcond 5 and removecond 5 for my private server. This is what i've been using: bindtoggle "-" "addcond 5; removecond 5". I've also been using: bind "-" "bindtoggle addcond 5; bindtoggle removecond 5". Neither worked. help please?