Team Fortress 2
making binds/scripts for only one class
there are videos on this, but I just want to put it simply.

for demo, I want Q to be +left and E to be +right
but only for demo. how is this done?
< >
Showing 1-6 of 6 comments
chibilibi May 4, 2014 @ 5:35pm 
In Team Fortress 2/tf/cfg, there are .cfg files for each class. Put your binds in there to be only for that class. Then rebind those in each other class' .cfg file, otherwise the commands will leak.

demoman.cfg is
unbind "Q"
unbind "E"
bind "Q" "+left"
bind "E" "+right"

all other classes.cfg is
unbind "Q"
unbind "E"
bind "Q" "lastinv" (By default, Q is last weapon)
bind "E" "voicemenu 0 0" (By default, E is call for medic)
Last edited by chibilibi; May 4, 2014 @ 5:36pm
Mikhail Gaming May 4, 2014 @ 6:02pm 
Originally posted by chibilibi:
In Team Fortress 2/tf/cfg, there are .cfg files for each class. Put your binds in there to be only for that class. Then rebind those in each other class' .cfg file, otherwise the commands will leak.

demoman.cfg is
unbind "Q"
unbind "E"
bind "Q" "+left"
bind "E" "+right"

all other classes.cfg is
unbind "Q"
unbind "E"
bind "Q" "lastinv" (By default, Q is last weapon)
bind "E" "voicemenu 0 0" (By default, E is call for medic)

this is very useful, but I don't see cfg files for each class. only config.cfg and config_default .cfg
chibilibi May 4, 2014 @ 6:18pm 
Originally posted by ~|^KlashFire^|~:
Originally posted by chibilibi:
In Team Fortress 2/tf/cfg, there are .cfg files for each class. Put your binds in there to be only for that class. Then rebind those in each other class' .cfg file, otherwise the commands will leak.

demoman.cfg is
unbind "Q"
unbind "E"
bind "Q" "+left"
bind "E" "+right"

all other classes.cfg is
unbind "Q"
unbind "E"
bind "Q" "lastinv" (By default, Q is last weapon)
bind "E" "voicemenu 0 0" (By default, E is call for medic)

this is very useful, but I don't see cfg files for each class. only config.cfg and config_default .cfg

In that case, create them. Mine are as follows (they have to be named these EXACTLY):
demoman.cfg
engineer.cfg
heavyweapons.cfg
medic.cfg
pyro.cfg
scout.cfg
sniper.cfg
soldier.cfg
spy.cfg

In case you don't know how to create them (though you probably do), just create a new text file with the name of the cfg file you want it to be, then change the file extension to .cfg rather than .txt.
Last edited by chibilibi; May 4, 2014 @ 6:19pm
necroer
Originally posted by arnoldzik203:
necroer
why
HamWieldingTank Aug 14, 2022 @ 11:47am 
btw, you do not need to unbind keys to rebind them
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: May 4, 2014 @ 5:22pm
Posts: 6