r/tf2scripthelp • • May 31 '20

Answered i installed mastercomfig and now my autoexec script doesnt work anymore

4 Upvotes

this was the only script i had installed:

alias +rocketjump "+jump; +duck; wait; +attack"
alias -rocketjump "-jump; -attack; wait; wait; wait; -duck"
bind "MOUSE5" "+rocketjump"

it was working fine until i installed mastercomfig. when i press MOUSE5, nothing happens

the location of my script is located at:

D:\steam\steamapps\common\Team Fortress 2\tf\cfg

r/tf2scripthelp • • May 20 '20

Question What is the point of the command "cmd"?

Thumbnail self.tf2scripts
4 Upvotes

r/tf2scripthelp • • May 16 '20

Answered A script that cycles sprays

4 Upvotes

I've been trying to build a script that'll apply spray A, switch the selected spray to spray B, then apply spray B the next time the script is called.

This is what I've got so far:

bind "t" sprayLogo
alias sprayLogo "pic1"
alias "pic1"  "cl_logofile "materials/vgui/logos/Dinner.vtf"; impulse 201; alias sprayLogo pic3"
alias "pic3"  "cl_logofile "materials/vgui/logos/They-got-Frank.vtf"; impulse 201; alias sprayLogo pic4"
alias "pic4"  "cl_logofile "materials/vgui/logos/Why-are-we-here.vtf"; impulse 201; alias sprayLogo pic5"
alias "pic5"  "cl_logofile "materials/vgui/logos/XING.vtf"; impulse 201; alias sprayLogo pic1"

All it does is apply the default spray, not the one assigned to "pic1", and it doesn't cycle.

I've tried a couple other formats for the cl_logofile part, with equal success:

cl_logofile materials/vgui/logos/Dinner.vtf

and

cl_logofile  = "materials/vgui/logos/Dinner.vtf"

and

cl_logofile = materials/vgui/logos/Dinner.vtf

materials/vgui/logos/ is where all the .vtf files live, so I'm pretty sure the path is right at least.

I haven't been able to find any discussions about it, so for all I know, this is explicitly impossible.


r/tf2scripthelp • • Mar 28 '20

Answered Is it possible to bind a key to a class.

4 Upvotes

Would it be possible to make it so that I could change to scout on Numpad1 sol on Numpad2 etc.?


r/tf2scripthelp • • Feb 21 '20

Resolved Spy fast-sap script

4 Upvotes

I made a script to sap faster, but how can i make it so in the second part it switches to the pistol and then the knife?

//sapper

Alias +sap "slot2; +attack"

alias -sap "-attack; lastinv; voicemenu 1 2"

bind "MOUSE3" "+sap"

Thanks in advance.


r/tf2scripthelp • • Feb 11 '20

Answered Is anyone here aware of a method to dismiss the post-casual survey dialog boxes via a command?

4 Upvotes

I'm trying to smooth out the map vote glitch workaround in my script and I'm wondering if anyone here has a way to dismiss the post-casual-game survey boxes that come up sometimes, as they seem to block the next_map_vote command from taking effect.


r/tf2scripthelp • • Oct 07 '18

Question Casual mode team name switcher

4 Upvotes

in cas[](#flair "questioin in casual mode, theres an exploit, where players can change team names. (/img/zqwgv316uqq11.png) i was wondering if it's possible to automate this with a script.


r/tf2scripthelp • • Jul 12 '14

Issue I can't get any "Keyvalues" commands to work. I'm trying every different combo I can think of.

4 Upvotes

https://developer.valvesoftware.com/wiki/Obj_sentrygun

Starting Upgrade Level <choices> < this is the command I'm most interested in to get working, but I did try testing out other entities as well.

Does anyone have any experience in the Keyvalues department?


r/tf2scripthelp • • May 18 '14

Answered Binding a button to load different configs?

4 Upvotes

I am wondering if you can bind buttons to load different configs. This would be useful for spectator specific configs or loading a fpsmax config when you need to. I'm sure it is possible, I however am a dingus and can't figure out how. sorry if this has already been answered, i couldn't find anything like it so i figured it had not. thanks!!


r/tf2scripthelp • • Feb 17 '14

Answered Beginner, having a bit of trouble with the instructions in the wiki.

4 Upvotes

So I went to the browse local files part, tf, custom, there wasn't anything so I made a new folder called "raddaya" and went in.

But now I can't figure out what to do. It tells you to create your cfg files...by copying an existing cfg file? Huh?

Could anyone help me with this? I feel like such a noob D:


r/tf2scripthelp • • Dec 06 '13

Answered Why isn't my simple vaccinator script working?

4 Upvotes
alias +vac "+attack3"
alias -vac "-attack3"
bind mouse4 "+vac"

It's not working and I have no idea why, I use this:

hud_fastswitch 1
bind MWHEELUP slot1
bind MWHEELDOWN slot2
bind MOUSE3 slot3

so I don't want the vaccinator on mouse 3, I want it on mouse 4. I can't bind mouse 4 to attack 3 in options because I use mouse 4 for scripts on my other classes. Thanks for your help.


r/tf2scripthelp • • Aug 08 '13

Stale I want viewmodels for primary on every class but spy how do i do this

4 Upvotes

I recently installed stabby's spy scripts but I would like to retain my viewmodels for other classes how would I go about this


r/tf2scripthelp • • Jul 31 '13

Answered Rebinding the disguise kit keys

4 Upvotes

Hello, I recently wrote a spy script to toggle viewmodels on/off depending on what weapon is equipped and it works great except for one problem. When I use the disguise kit, it sometimes messes the script up because it returns to your last equipped weapon and I can't figure out a way to trigger any additional script lines when that happens, so the script ends up out of order and the wrong weapons have their viewmodels toggled. Is there a way to rebind the keys in the disguise menu or trigger a script when the disguise command is used?

Here is the script in case it's relevant: http://pastebin.com/3HnUtCBn


r/tf2scripthelp • • Jul 27 '13

Answered Where exactly I am supposed to put scripts and what is the architecture supposed to look like?

4 Upvotes

right now I have 2 copies of all my scripts and things in two places;

Steam>steamapps>common>Team Fortress 2>tf>custom>cfg
Steam>steamapps>[my username]>team fortress 2>tf>cfg

all my class cfg files have 'exec config.cfg' before anything else and so does my autoexec file but when I switch to the class I'm testing my script for and check the console it says "[class].cfg not present, not executing" but all my custom binds in config.cfg work just fine so I can't figure out why none of my class files are being found.


r/tf2scripthelp • • Jul 10 '13

Answered Melee viewmodels not properly working with rebinded key.

4 Upvotes

I have a soldier script that's a bit by me and a bit pieced together from other scripts. I currently am having issues with viewmodels on it. The script binds mouse 3 to wield my escape plan and holding it will attack, but for some reason when I use this my Escape Plan viewmodel does not show. My Rocket Launcher and Shotgun work as I would like them to when I do mwheelup and mwheeldown for them, respectively. Whenever I switch to my escape plan with my number key the viewmodel is how I like it, at 100 fov.

// All Class
exec config_default
cl_autoreload 1

// Escape Plan
alias "+melee" "slot3;+attack"
alias "-melee" "-attack"

// Rocket Jump
alias +rocketjump "+duck;+attack;+jump;"
alias -rocketjump "-duck;-attack;-jump;"

// Medic Down
alias "killmed" "say_team "An enemy Medic is down!";voicemenu 0 2"

// Mouse Wheel
alias "wheelrockets" "slot1"
alias "wheelshotty" "slot2"

// Quickswitching
alias w1 "slot1; alias QW w2; alias LW w1"
alias w2 "slot2; alias QW w1; alias LW w2"
w1

// Binds
bind "mouse3" "+melee"
bind "mouse4" "+rocketjump"
bind "mwheelup" "wheelrockets"
bind "mwheeldown" "wheelshotty"
bind "1" "w1"
bind "2" "w2"
bind "q" "QW"
bind "b" "killmed"

// Viewmodel Binds
bind 1 "slot1; viewmodel_fov 90; r_drawviewmodel 0;" 
bind 2 "slot2; viewmodel_fov 90; r_drawviewmodel 0;"
bind 3 "slot3; viewmodel_fov 100; r_drawviewmodel 1;"

If someone can figure out what's going wrong with my melee viewmodels I'd be delighted.


r/tf2scripthelp • • Jul 07 '13

Resolved Issue - Engineer Scripts aren't being read.

4 Upvotes

So, when I go Engineer, it won't use my custom cfg, unless I switch class, then switch back to Engineer. I have custom binds in my autoexec, which should affect all classes except Spy. But it doesnt affect Engineer until I switch. I had an Engineer-Only script, but that doesnt work, even if I switch.

My Autoexec (This doesn't work for Engineer until I switch class and switch back)

My Reset config

I have "Exec Reset" in each cfg. Except from Spy, they contain only that line, and they all work correctly (Except Engineer)

The file is definitely a .CFG and is named "engineer" and is located in

Steam -> Steamapps -> My name-> Team Fortress 2 -> tf -> cfg

When I try and start the config in-game using the console, it doesn't activate (for my custom build script) but it does for all other classes.

My Engi seems exactly the same as the other classes, so I don't see why it isn't working. Is there anything special that needs to be done for Engineer?

Thanks in advance, I'd be very grateful if you knew what do to.


r/tf2scripthelp • • Mar 23 '13

Wiki Typo

4 Upvotes

In the "Common Scripts" section of the wiki, I just noticed the Demoman charge script has a typo.

alias -mosue2 -charge

Just thought I'd point it out.

Also, sorry if I'm putting this in the wrong place, don't really know where it goes.


r/tf2scripthelp • • Mar 10 '13

Resolved Viewmodel toggle for sniper rifle ONLY

4 Upvotes

Hey all, I'm trying to make a script that permanently turns off the viewmodel for the sniper rifle slot ONLY. i.e. I would still have the viewmodels for everything else for every other class, and the viewmodels for slots 2 and 3 for the sniper. The script I have right now is below. Things kinda worked at first but then it all went to hell and I had to rebind my weapon slot keys (1-4). Keep in mind I'm pretty damn new at this so go easy on me :) Thanks for any help you can give.

I put this in my sniper.cfg:

//Sniper rifle viewmodel hide //----------------------------- alias slot_1 "slot1; r_drawviewmodel 0" alias slot_2 "slot2; r_drawviewmodel 1" alias slot_3 "slot3; r_drawviewmodel 1" bind "1" slot_1 bind "2" slot_2 bind "3" slot_3


r/tf2scripthelp • • Jan 20 '25

Question Help with a script that auto spectates my sentry.

3 Upvotes

Hello, I am trying to have another account spectate my sentry automatically in casual or community server for a special camera for my tf2 livestream. I know there is a method for "spectating" in casual, additionally I don't know how to make scripts which i believe is what it needs. How complicated would this be to make and is it even possible?


r/tf2scripthelp • • Sep 15 '24

Issue My Scripts do not seem to be working

3 Upvotes

I am running Mastercomfig. I have downloaded the templates from here and the templates are in tf/cfg/ where they belong according to that document.

I haven't played TF2 or messed around with scripting for it for quite a long time now so it's possible I've forgotten to do something or used an obsolete script that wouldn't function due to changes with how things are done.

Here is a one of my shorter scripts that is not functioning.

Echo **Running Heavy**

alias +heavy_shoot "slot1; +attack"
alias -heavy_shoot "-attack"
alias +heavy_sandvich "slot2; +attack"
alias -heavy_sandvich "-attack"
alias +heavy_melee "slot3; +attack"
alias -heavy_melee "-attack"

bind mouse1 "+attack"
bind mouse2 "+attack2"
bind mouse3 "+heavy_melee"
bind mwheelup "+heavy_shoot"
bind mwheeldown "+heavy_secondary"

Aside from the bindings not functioning the echo command is not printing Running Heavy* when it should be running the script.

Not only was the script not doing what it should when I switched to playing a different class I was unable to use any of their weapons. I just hit the mouse button to fire and nothing would happen. Am I missing a command that would clear rebound keys between switching classes or something?

Edit: Me being unable to use my weapons may in fact be a problem I was having with the server I was on. It continued to happen even when I deleted all the scripting leaving the scripts blank. Attempting again with exec config_default in the pre-comfig.cfg file and all other scrips blank to see if resetting everything not effected by Mastercomfig fixes it. I doubt Mastercomfig itself is at fault because other than the heavyweapons.cfg not running everything else was working fine.

Edit: I have solved the issue with no longer being able to use my weapons by use of exec config_default. Currently still having the issue of my class.cfg files not seeming to function. Will see what I can do about that later in the day.


r/tf2scripthelp • • Sep 03 '24

Issue Autoexec/Class scripts not working/recognized by the game

3 Upvotes

I am using mastercomfig, and on this 3 year old post from this subreddit it said make the execs in tf/cfg/user
Created a folder named user but it still won't work.

Besides that, will this work? I have some experience from creating autoexecs in csgo, and I want to hide pyro's flames

exec autoexec in every class

Autoexec:
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
r_drawviewmodel 1

Pyro:
exec autoexec

unbind "1"
unbind "2"
unbind "3"

alias "flamethrower" "slot1; r_drawviewmodel 0; viewmodel_fov 1"
alias "flaregun" "slot2; r_drawviewmodel 1; viewmodel_fov 90"
alias "hammer" "slot3; r_drawviewmodel 1; viewmodel_fov 90"

bind "1" "flamethrower"
bind "2" "flaregun"
bind "3" "hammer"

r/tf2scripthelp • • Jul 22 '24

Issue My bind stopped working Idk why

3 Upvotes

sec;prim

bind 1 "-attack2;slot1;sec;prim"

bind 2 "-attack2;sec2;prim2;slot2"

bind 3 "-attack2;sec2;prim2;slot3"

bind mouse4 "-attack;-attack2"

alias toggle "enable"

alias enable "alias toggle disable; +attack2"

alias disable "alias toggle enable; -attack2"

alias ptoggle "penable"

alias penable "alias ptoggle pdisable;+attack"

alias pdisable "alias ptoggle penable;-attack"

alias sec "bind mouse2 toggle"

alias prim "bind mouse1 ptoggle"

alias sec2 "bind mouse2 +attack2"

alias prim2 "bind mouse1 +attack"

I have this script so I can toggle my reving and shooting for heavy.
After the summer update when I press secondary fire the minigun doesn't rev when I click mouse2. The bind for mouse 2 is literally the same and it doesn't work.


r/tf2scripthelp • • May 27 '24

Question Script on respawn

3 Upvotes

Is there a way to do a script each time you respawn?
I have a rev toggle and when I respawn it automatically revs because I didn't unrev before death and it's really annoying.


r/tf2scripthelp • • Apr 28 '24

Question Chat bind for medic also bind for other class.

3 Upvotes

i have this medic specific script

alias Uber_Ready "say_team Ze Uber is zeady my friend; voicemenu 1 7"

bind t Uber_Ready

to bind uber ready in chat with the uber charged voiceline but now after i switch to medic it also stay binded for all the other class. Is there a way to make this script specifically only for the medic?