Are there class-specific versions of autoexec in TF2?

Are there class-specific versions of autoexec in TF2? - People Sitting on Chair Inside Building

I'd like to have certain commands execute when I change to a specific class. For instance, when I change to Spy, I'd like to immediately disguise as an enemy Pyro.
I know I can use this command to do so:

disguise 7 -1

However, I'd like to do this as soon as I spawn as Spy, not when I press a key.

Is there a config file that is always run when I spawn as a certain class, similar to how autoexec.cfg is always run when I start the game?






Pictures about "Are there class-specific versions of autoexec in TF2?"

Are there class-specific versions of autoexec in TF2? - Woman in White Knit Sweater Sitting Beside Woman in Black Shirt
Are there class-specific versions of autoexec in TF2? - A Happy Girl Sitting in Front of Her Tablet while Looking Afar
Are there class-specific versions of autoexec in TF2? - A Girl Having Her Online Class at Home



How do I make an Autoexec in TF2?

  • Go to C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Team Fortress 2\\tf\\cfg.
  • If they aren't there already, create the following cfg files using Notepad: demoman. ...
  • A class's config will run every time you select that class in a game.


  • How do you make a class CFG TF2?

    Right click on Team Fortress 2, click \u201cPROPERTIES\u201d and then click on \u201cLOCAL FILES\u201d at the top and lastly \u201cBROWSE LOCAL FILES\u201d. Once you've click that you need to go inside of the \u201ctf\u201d folder and inside of that \u201ccfg\u201d. This is the folder where your autoexec file needs to be located.



    how to make a config in tf2 (including class config examples)




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: cottonbro, cottonbro, Annushka Ahuja, Annushka Ahuja