Team Fortress 2
Yo Niqqa Jan 28, 2014 @ 8:03pm
Script for automatic disguise for spy.
I have heard that you can use a script for automatically disguising a spy, once the left mouse button is pressed. So basically, I need to assign the left mouse button for disguising as well as attacking. A full detailed step-by-step process would be much appreciated. Also, for some of the players, out there, this process is not "hacking" or cheating. It is more of a convenient binding of keys and buttons.
< >
Showing 1-15 of 36 comments
Qui "Hit The Quan" Jinn (Banned) Jan 28, 2014 @ 8:08pm 
Bind mouse1 "disguise 1"
Yo Niqqa Jan 28, 2014 @ 8:12pm 
But would that result in simultaneous operation, resulting me to backstab and disguise at the same time. (Same time in the sense of starting the operation)
Yo Niqqa Jan 28, 2014 @ 8:22pm 
I think that would lead to erasing of the mouse1's function which is attack and then replace that with disguise, therefore instead of backstabbing someone, i would go behind some one and then disguise, which would be quite inefficient.
bar Jan 28, 2014 @ 8:43pm 
alias waitTester "alias waitTest waitPositive; wait; waitTest"
alias wait "alias waitTest waitNegative"
alias waitPositive "echo Wait is enabled on this server.; exec waitPositive.cfg"
alias waitNegative "echo Wait is DISABLED on this server!; exec waitNegative.cfg"

bind mouse1 "attack;wait;disguise 1"
Last edited by bar; Jan 28, 2014 @ 8:52pm
Ace42 Jan 28, 2014 @ 10:17pm 
C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\cfg
Create a plaintext document in notepad; save it as Spy.cfg (make sure it's not getting saved as Spy.cfg.txt or anything else).

Paste into it:
exec ClassDefaults.cfg
// Spy Attack and Disguise
// =======================
alias +spy_attackdisguise "+attack"
alias -spy_attackdisguise "-attack; lastdisguise"
bind "Mouse1" "+spy_attackdisguise"


That will automatically apply your last used disguise when you let go of your mouse1 button.

Change "lastdisguise" for "last disguise random" if you want to change your disguise to a random one every time you release the firebutton instead.

Create a ClassDefaults.cfg file and put in default binds for every class-specific bind you go on to create; that way you can always start with a "fresh slate" every time you change class and start applying the class-specific binds.
Last edited by Ace42; Jan 28, 2014 @ 10:21pm
I am alive!! (Banned) Jan 28, 2014 @ 10:47pm 
Originally posted by demoknightscottish:
But would that result in simultaneous operation, resulting me to backstab and disguise at the same time. (Same time in the sense of starting the operation)
You COULD always do the wait command as wel as alias
Last edited by I am alive!!; Jan 28, 2014 @ 10:47pm
LEPrecon Jan 28, 2014 @ 11:15pm 
Just press B ya nooby binders.
Sentient_Toaster Jan 29, 2014 @ 2:59am 
Originally posted by Flippy:
Originally posted by demoknightscottish:
But would that result in simultaneous operation, resulting me to backstab and disguise at the same time. (Same time in the sense of starting the operation)
You COULD always do the wait command as wel as alias

The 'wait' command tends to be banned.

Originally posted by LEPrecon *Anti Brony*:
Just press B ya nooby binders.

Yup.
Satsujin Jiken Jan 29, 2014 @ 3:09am 
I have mouse3 bound to lastdisguise but honestly I never use it. I just rather tap 44, 43 or something situational like 46 or 48. Seems a bit silly you'll be spamming disguises even when you're firing revolver for example. Also can't remove disguise by attacking :P
Ace42 Jan 29, 2014 @ 3:13am 
Originally posted by Satsujin Jiken:
I have mouse3 bound to lastdisguise but honestly I never use it. I just rather tap 44, 43 or something situational like 46 or 48. Seems a bit silly you'll be spamming disguises even when you're firing revolver for example. Also can't remove disguise by attacking :P

Spamming last disguise even firing your revolver can be quite useful. Say you're trying to Snipe someone with the Amby and they run around a corner, they're quite possibly going to be oblivious to you or wonder what hit them, but if they start looking around in a panic and see an undisguised spy running after them they're going to know straight away what you've done.

I can't tell you the number of times I've found myself going "Surely someone saw that puff of disguise smoke!" and they've just walked straight on because the redisguise was just quick enough for them to miss it.

Oh, and I have a key set to remove disguise without having to do anything as conspicuous as attack; but it's useless aside from taunting. If you're trying to do something disguiseless like capping a point or pushing a cart, you're better off going friendly disguise than naked.
Last edited by Ace42; Jan 29, 2014 @ 3:15am
Satsujin Jiken Jan 29, 2014 @ 3:28am 
OFC I always apply disguise when I don't intend to fire in the next few seconds before I get it on. For me the lastdisguise bind wouldn't increase the time I spend disguised, only the time I'd spent applying disguise with puffs that are IMO very visual and alarming. But good point for many, I think.

Indeed friendly disguise is best for capping but sometimes like backcapping it's about seconds you don't want to waste them waiting for it. Gotta love disguise capping though, you can anti-class the one guy who would be able to prevent the cap, like get a heavy disguise if you see a scout running around or pyro for spy and chances are the enemy won't even try to prevent you from capping.
Last edited by Satsujin Jiken; Jan 29, 2014 @ 3:28am
Conga Lyne Jan 30, 2014 @ 10:57pm 
Originally posted by Ace42:
C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\cfg
Create a plaintext document in notepad; save it as Spy.cfg (make sure it's not getting saved as Spy.cfg.txt or anything else).

Paste into it:
exec ClassDefaults.cfg
// Spy Attack and Disguise
// =======================
alias +spy_attackdisguise "+attack"
alias -spy_attackdisguise "-attack; lastdisguise"
bind "Mouse1" "+spy_attackdisguise"


That will automatically apply your last used disguise when you let go of your mouse1 button.

Change "lastdisguise" for "last disguise random" if you want to change your disguise to a random one every time you release the firebutton instead.

Create a ClassDefaults.cfg file and put in default binds for every class-specific bind you go on to create; that way you can always start with a "fresh slate" every time you change class and start applying the class-specific binds.

Can you simpilfy

Create a ClassDefaults.cfg file and put in default binds for every class-specific bind you go on to create; that way you can always start with a "fresh slate" every time you change class and start applying the class-specific binds.

I'm not an A++ genius with coding
Ace42 Jan 30, 2014 @ 11:58pm 
Originally posted by =L.M.G= Gman is scout:
Can you simpilfy

Create a ClassDefaults.cfg file and put in default binds for every class-specific bind you go on to create; that way you can always start with a "fresh slate" every time you change class and start applying the class-specific binds.

I'm not an A++ genius with coding

Well, imagine you went to Pyro.cfg and made your attack key to be a toggle; you'd not want that to be the case for your other classes, would you? So you need to set all the classes that AREN'T pyro just to use the regular attack. The quickest way to do that is to have all your classes run a script called "ClassDefaults.cfg" first whenever you switch to them, and just put the regular attack bind in there, rather than typing it out for every class except Pyro.

Make sense?
I am alive!! (Banned) Jan 31, 2014 @ 12:02am 
Here's a script that binds all of the keypad keys to the spy disguises
1 is scout
2 is soldier
3 is pyro
etc
0 is undisguise
(It's 1 more button to press, but it works)

Copy & Paste this into spy.cfg (or copy and paste them one by one into the console)

bind "KP_HOME" "disguise 1 -1"
bind "KP_UPARROW" "disguise 3 -1"
bind "KP_PGUP" "disguise 7 -1"
bind "KP_LEFTARROW" "disguise 4 -1"
bind "KP_5" "disguise 6 -1"
bind "KP_RIGHTARROW" "disguise 9 -1"
bind "KP_END" "disguise 5 -1"
bind "KP_DOWNARROW" "disguise 2 -1"
bind "KP_PGDN" "disguise 8 -1"
bind "KP_INS" "disguise 8 -2"
I am alive!! (Banned) Jan 31, 2014 @ 12:03am 
Originally posted by Ace42:
Originally posted by =L.M.G= Gman is scout:
Can you simpilfy

Create a ClassDefaults.cfg file and put in default binds for every class-specific bind you go on to create; that way you can always start with a "fresh slate" every time you change class and start applying the class-specific binds.

I'm not an A++ genius with coding

Well, imagine you went to Pyro.cfg and made your attack key to be a toggle; you'd not want that to be the case for your other classes, would you? So you need to set all the classes that AREN'T pyro just to use the regular attack. The quickest way to do that is to have all your classes run a script called "ClassDefaults.cfg" first whenever you switch to them, and just put the regular attack bind in there, rather than typing it out for every class except Pyro.

Make sense?
Just bind them to the keypad keys so you won't have to worry about that
< >
Showing 1-15 of 36 comments
Per page: 1530 50

Date Posted: Jan 28, 2014 @ 8:03pm
Posts: 36