Hey guys, I've been trying to get a class switch bind to switch my soldier from spy back to soldier so i can resup in an instant. I followed this thread: https://www.teamfortress.tv/8432/class-change-bind, but when I put it in my soldier.cfg it switched me to spy but not back to soldier. Does anyone have a working script? Thx
bind "c" "load_itempreset 0" will resup you instantly
that thread has one way class switch scripts in it
that thread has one way class switch scripts in it
ekh0bind "c" "load_itempreset 0"
That's what I had before, but I noticed that there's a delay often when I use it, which is why I wanted to use the class swap script to basically instantly resup
That's what I had before, but I noticed that there's a delay often when I use it, which is why I wanted to use the class swap script to basically instantly resup
As far as I know there's no way in tf2 to do things like: Issue command 1 and then issue command 2 except for on some servers. Therefore the only way to accomplish that would be to hit a key two times. First time switches to spy second time back to soldier. In tf2 console commands no matter how you put them all of them get executed "at the same time".
This might also not properly work if you only put the script into the soldier.cfg I'm not certain on that though.
You could make it so your soldier.cfg is something like this : bind "c" "join_class spy" and in the spy.cfg you have bind "c" "join_class soldier". But this is most definitely not as fast as to just do what ekh0 suggested.
This might also not properly work if you only put the script into the soldier.cfg I'm not certain on that though.
You could make it so your soldier.cfg is something like this : bind "c" "join_class spy" and in the spy.cfg you have bind "c" "join_class soldier". But this is most definitely not as fast as to just do what ekh0 suggested.
I'd do it like this:
alias +switch_class "join_class spy"
alias -switch_class "join_class soldier"
bind KEY +switch_class
first command gets executed when u press down and the second when you let go of the key. So you need to hold the button until it actually switched class.
You should adjust the aliases in your class cfgs so they work for other classes as well.
alias +switch_class "join_class spy"
alias -switch_class "join_class soldier"
bind KEY +switch_class
first command gets executed when u press down and the second when you let go of the key. So you need to hold the button until it actually switched class.
You should adjust the aliases in your class cfgs so they work for other classes as well.
Put it on scroll wheel and just spam scroll wheel when you get close to spawn
slateI'd do it like this:
alias +switch_class "join_class spy"
alias -switch_class "join_class soldier"
bind KEY +switch_class
first command gets executed when u press down and the second when you let go of the key. So you need to hold the button until it actually switched class.
You should adjust the aliases in your class cfgs so they work for other classes as well.
you can also have it join_class random and then join class soldier (for soldier cfg) except sometimes if there's already someone offclassing on that class then you can't do it
spy or pyro are good though since there's a class limit of 2 and there's almost never two of them already
edit: the load_itempreset thing does not happen immediately (if you pre-fire it before you get to spawn you can get it to work but you have to spam it), but afaik the class swap actually does happen instantly and doesn't potentially get delayed by item server or lag
alias +switch_class "join_class spy"
alias -switch_class "join_class soldier"
bind KEY +switch_class
first command gets executed when u press down and the second when you let go of the key. So you need to hold the button until it actually switched class.
You should adjust the aliases in your class cfgs so they work for other classes as well.[/quote]
you can also have it join_class random and then join class soldier (for soldier cfg) except sometimes if there's already someone offclassing on that class then you can't do it
spy or pyro are good though since there's a class limit of 2 and there's almost never two of them already
edit: the load_itempreset thing does not happen immediately (if you pre-fire it before you get to spawn you can get it to work but you have to spam it), but afaik the class swap actually does happen instantly and doesn't potentially get delayed by item server or lag