r/tf2scripthelp • • Jun 19 '21

Question Is there a way to have multiple map configs in one config file?

2 Upvotes

Whenever you join a map, a config will be executed for that map if it exists. For example, when you join a server on jump_beef, TF2 will look for jump_beef.cfg and exec it.

I want to create like a dozen map configs but I don't want a dozen config files in my cfg folder. Is there a way to have all of those configs in one file to reduce clutter?


r/tf2scripthelp • • Jun 02 '21

Issue is there an ent_create command for a payload cart

2 Upvotes

i need it for an sfm


r/tf2scripthelp • • Feb 23 '21

Question how to make a separate steam installation with no browser

2 Upvotes

i heard it get you more frames but i cant understand how to modify program launch options, and i wanta separate install of steam without browser and webhelper for when i play alone. i couldnt find a better sub to post this in (i couldve posted it to tftv tho, i will do that if u guys dont know)


r/tf2scripthelp • • Jan 30 '21

Answered Scripts stop working after a death or team switch

2 Upvotes

The script (toggle saying !fp !tp ) will work when i join a game, but after an event, it stops working entirely and instead M (The button I binded it to) resets back to opening the inventory

Script in question

unbind "m"
bind m fp_tp
alias fp_tp_toggle "say !fp; alias fp_tp tp_fp_toggle"
alias tp_fp_toggle "say !tp; alias fp_tp fp_tp_toggle"
tp_fp_toggle

It is located in my Autoexex.cfg

Thx :)


r/tf2scripthelp • • Jan 19 '21

Resolved Are there any scripts for truly instant building?

2 Upvotes

I was just wondering if there was any way to not just instantly bring up the toolbox, but instantly place it down aswell without holding leftclick. (solved)


r/tf2scripthelp • • Jan 09 '21

Answered How do you set a point entity's position?

2 Upvotes

I'm working on a config that allows you to play MvM with Bots on red team on listenservers, and also improve the Red Bot's "AI" to help the player out. (I know this requires sv_cheats 1, but again this is only intended for listenservers.)

One of these tweaks I am trying to do is to change the bot engineer building hints, since they're placements are terrible. Unfortunately though, they're entities which are included in the map. I can remove the bad bot engineer hints of course, but the problem is that bot engineers will only build if there's at least one bot engi hint. I have no idea how to create an entity at a specific position thoigh, meaning on maps that have no bot engi hints (mvm_coaltown and mvm_mannworks for example), I have no idea how to get the engineer, to build at certain places aside from teleporting the player and having him run the ent_create commands.


r/tf2scripthelp • • Jan 08 '21

Resolved I can't bind actions to random buttons???

2 Upvotes

I think i messed up my steam big screen options, I'm using xbox 1 controller I got it working fine last night but now I can't jump among other things


r/tf2scripthelp • • Jan 04 '21

Answered Weapon Script help

2 Upvotes

i have this script for weapon switching in my autoexec (feel free to use it) and it works fairly well and allows me to use my scroll wheel for my main weapon switching

/////Advanced Quick Switch;

alias +primary "slot1; bind mwheelup +secondary; bind mwheeldown +melee"

alias +secondary "slot2; bind mwheelup +primary; bind mwheeldown +melee"

alias +melee "slot3; bind mwheelup +primary; bind mwheeldown +secondary"

bind mwheelup "+secondary"

bind mwheeldown "+melee"

but, it requires the game to remember slot on respawn and most annoyingly

doesnt account for loadouts that make a weapon slot unavailable, such as demoknight or soldier with boots or parachute, or loadouts with recharging weapons, like jarate or lunchbox items

is there a way i could script it to check which slot is currently active**?**


r/tf2scripthelp • • Dec 29 '20

Question Help i want to move the buildings ui (sentry, dispenser, tele)

2 Upvotes

I am using a custom hud that moved the chat to the top left and I just moved chat to the bottom left but now whenever I play engi the buildings ui is in the middle and I want to move it to top left of my screen. Also I cant find any tutorial on it so im asking on reddit. p.s where can I find the building ui thing


r/tf2scripthelp • • Dec 22 '20

Question i need help

2 Upvotes

what command i should use to launch other command (map_background itemtest; wait 10; disconnect) always when i'm in main menu? autoexec.cfg work only when i launch game first time


r/tf2scripthelp • • Oct 27 '20

Question script help

2 Upvotes

is there a way so i can make a script so it says /goto then presses a number after that (yes this is for jump academy) i thought i could do something like bind KP_END “say /goto; wait 1; then it would press a button, anyone know how to do that?


r/tf2scripthelp • • Sep 29 '20

Question melee only view models

2 Upvotes

ok so I got that turns view models off and on but not for melee, but it automatically unbinds slot 4 and 5. i play spy on occasion and i would not like to rebind 4 every time I switch to him. just because the script looks pretty complicated ill paste the on and off versions here. i just want to know how i bind 4 to the forth slot or disguise kit.

ON

bind "1" swep1

bind "2" swep2

bind "3" swep3

bind "MWHEELUP" whup

bind "MWHEELDOWN" whdn

//////////////////////////////////////////

bind "MWHEELDOWN" "swep3"

bind "MWHEELUP" "swep2"

bind "MOUSE4" "swep1"

bind "MOUSE5" "swep2"

//////////////////////////////////////////////////////////////////////////////////////////////////////

// // wx1 is primary, wx2 is secondary, and wx3 is meele, //

alias "wx1" "r_drawviewmodel 0" // slots 4+5 are alloff by default //

alias "wx2" "r_drawviewmodel 0" // //

alias "wx3" "r_drawviewmodel 1" // //

// // //

//////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////

alias aba "cwep1;alias sweps abb;won1"

alias abb "cwep2;alias sweps aba;won2"

alias bcb "cwep2;alias sweps bcc;won2"

alias bcc "cwep3;alias sweps bcb;won3"

alias cac "cwep3;alias sweps caa;won3"

alias caa "cwep1;alias sweps cac;won1"

alias cwep1 "slot1;wx1"

alias cwep2 "slot2;wx2"

alias cwep3 "slot3;wx3"

alias swep1 "cwep1;awbind"

alias swep2 "cwep2;bwbind"

alias swep3 "cwep3;cwbind"

alias swep4 "won4or5;slot4"

alias swep5 "won4or5;slot5"

alias won1 "alias whdn cac; alias whup bcb; alias awbind none; alias bwbind abb; alias cwbind cac"

alias won2 "alias whdn aba; alias whup bcc; alias awbind aba; alias bwbind none; alias cwbind bcc"

alias won3 "alias whdn abb; alias whup caa; alias awbind caa; alias bwbind bcb; alias cwbind none"

alias won4or5 "alias whdn cac; alias whup caa; alias awbind caa; alias bwbind abb; alias cwbind cac"

alias none ""

aba

////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////

OFF

bind "1" swep1

bind "2" swep2

bind "3" swep3

bind "MWHEELUP" whup

bind "MWHEELDOWN" whdn

//////////////////////////////////////////

bind "MWHEELDOWN" "swep3"

bind "MWHEELUP" "swep2"

bind "MOUSE4" "swep1"

bind "MOUSE5" "swep2"

//////////////////////////////////////////////////////////////////////////////////////////////////////

// // wx1 is primary, wx2 is secondary, and wx3 is meele, //

alias "wx1" "r_drawviewmodel 1" // slots 4+5 are alloff by default //

alias "wx2" "r_drawviewmodel 1" // you can re-alias the wx1-3 in each class config for //

alias "wx3" "r_drawviewmodel 1" // //

// // //

//////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////

alias aba "cwep1;alias sweps abb;won1"

alias abb "cwep2;alias sweps aba;won2"

alias bcb "cwep2;alias sweps bcc;won2"

alias bcc "cwep3;alias sweps bcb;won3"

alias cac "cwep3;alias sweps caa;won3"

alias caa "cwep1;alias sweps cac;won1"

alias cwep1 "slot1;wx1"

alias cwep2 "slot2;wx2"

alias cwep3 "slot3;wx3"

alias swep1 "cwep1;awbind"

alias swep2 "cwep2;bwbind"

alias swep3 "cwep3;cwbind"

alias swep4 "won4or5;slot4"

alias swep5 "won4or5;slot5"

alias won1 "alias whdn cac; alias whup bcb; alias awbind none; alias bwbind abb; alias cwbind cac"

alias won2 "alias whdn aba; alias whup bcc; alias awbind aba; alias bwbind none; alias cwbind bcc"

alias won3 "alias whdn abb; alias whup caa; alias awbind caa; alias bwbind bcb; alias cwbind none"

alias won4or5 "alias whdn cac; alias whup caa; alias awbind caa; alias bwbind abb; alias cwbind cac"

alias none ""

aba

////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////


r/tf2scripthelp • • Aug 18 '20

Question Help opening find a game menu

2 Upvotes

I'm making a hud and I am trying to map a button on the main menu to open the matchmaking UI (where you can select casual or comp) Some other huds have custom uis that can open it and I've gone into their files but can't find the script that they use to open the menu.


r/tf2scripthelp • • Jul 31 '20

Issue I need help again

2 Upvotes

So I’ve heard of team fortress 2 classic and I really want to play it but for some reason when I download source SDK base 2013 multiplayer my computer restarts over and over im not to sure why this happens and since it restarts I have to download tf2c again if any of you people know how to fix this problem it would mean a lot please and thanks


r/tf2scripthelp • • Jul 26 '20

Question I need help with my lerp stuff

2 Upvotes

my auto exc

cl_cmdrate 66

cl_interp 0

cl_interp_ratio 1

cl_lagcompensation 1

cl_pred_optimize 2

cl_smooth 0

cl_smoothtime 0.01

cl_updaterate 66

rate 60000

but my lerp is like perma yellow in casual how do I fix? and make it like orange


r/tf2scripthelp • • Jul 16 '20

Issue Can you help me pls with the scripts of cfg.tf

2 Upvotes

I've been messing around with scripts for a while now and everything is fine but the interp, for some reason, it just locks on 0303 like its fine for projectile but not so good for hitscan classes, and I can't change it, can u pls help me?


r/tf2scripthelp • • Jun 24 '20

Issue Weapon Sheens

2 Upvotes

Hi, not sure if this is the right place to post it but.. yeah

I downloaded the master config from a tf.tv post and it's working pretty well. However, it disables weapon sheens and I want them enabled. Every post I've viewed on this matter says you have to input -dxlevel 90 or 95~ and it'll work but I've done this and I still can't see the sheens. help?


r/tf2scripthelp • • May 26 '20

Wrong section I need your help! [Script TF2]

2 Upvotes

Hello everybody, I'm new to TF2 scripting and could use some help.

I rented a server on nitrado because I want to make a german server

[there are not many german servers in tf2] so I decided I'm making my own.

but that's easier said than actually done are they any good scripters here that could explain to me where I can script and how it works not a tutorial, just a simple explanation. Thanks.


r/tf2scripthelp • • May 25 '20

Resolved Faulty Medic Script

2 Upvotes

I've taken a line of code from General's Medic Config, which makes me switch to mouse 2 and activate uber, regardless of which weapon I'm holding. However it has not been functioning properly.

+charge "+attack2;slot2;say_team "<<<UBER ACTIVATED>>>;wait 30;-attack2"

It should should switch me immediately to my medigun and activate uber, but it doesn't work and strangely makes me taunt when I press mouse2 with the ubersaw out.

Anyone have any ideas?


r/tf2scripthelp • • May 21 '20

Question engineer mouse wheel

2 Upvotes

I need help getting the mouse wheel to only switch to slots to my weapons not my pda's


r/tf2scripthelp • • May 15 '20

Meta Should r/TF2ScriptHelp Cover SourceMod Questions?

2 Upvotes

Hey all,

I just want to preface this by saying that I'm right now I'm coming to you all not as a mod, but as just another user of this sub. (Which, to be honest, is what I generally try to be: a normal user with flairing privileges. I like a clean sub, sue me.)

Anyway, I've been rolling this idea around in my head for quite a while, and I really want to know what you guys think:

Should r/TF2ScriptHelp cover SourceMod questions?

We're all programmers here, of a sort, and I have to imagine that someone here knows SourceMod. Additionally, there currently isn't any subreddit for SourceMod questions or discussions, and SM is technically a scripting language, right? I mean, it's just PAWN, but with added Source stuff, right? It can't be that hard. (haha oh god what the heck is a callback anyway)

Obviously, this would require separate flairs and categorizations, but that's fairly easy to implement on the backend. The real question is if any of you guys actually know SourceMod, and would be willing to answer SourceMod questions.

And I just want to stress that if we take on SourceMod questions, that would wholly be a side gig. The priority of this sub is and always will be console scripting. I just know that there are a lot of very talented programmers here from all kinds of backgrounds, and I think this would be a good opportunity for us to both get more traffic and become more well-rounded coders, as well as learn a bit more about the game we spend way too much of our lives on.

So, thoughts?


r/tf2scripthelp • • Apr 21 '20

Answered Chat Message Script [Help]

2 Upvotes

I've been trying to find/make a script that I can use to toggle a loop that says something in chat, but have run into a problem.

Firstly, here's the script as of now, for context:

  • alias looptexton "alias looptext say [message]; wait 10; looptext; bind p looptextoff; looptext"

  • alias looptextoff "bind p looptexton; alias looptext [gibberish]"

  • alias looptext "say [message]; wait 100; looptext"

  • bind p looptexton

Now, in the first line I want to make an alias that creates an alias that has multiple commands within it, but also executing other commands. The problem, which is also in that first line, is that I'm pretty sure it would need another set of " " to separate the alias with the normal commands. Right now all that command does is says the message once, then binds p to looptext off. What I'm aiming for is aliasing looptext correctly, looping looptext, then making p looptextoff which will toggle the command by making looptext not a command anymore. Any help is much appreciated.

Also, this script is a slightly modified version of the script from a comment made by u/unhandybirch656 I found in this post from two years ago.


r/tf2scripthelp • • Apr 06 '20

Answered Loadout Configs?

2 Upvotes

Is it possible for me to make a .cfg file that is executed specifically when I am using a specific weapon/loadout? Thanks in advance.


r/tf2scripthelp • • Feb 29 '20

Resolved help with sandvich

2 Upvotes

I recently found this script the concept is interesting but it doesn't work I would appreciate some help on this

Heavy Exclusive Script

This heavy script lets you throw the sandvich with one click and eat the sandvich.
WARNING: If you do the "eat sandvich" while your minigun is revving down, you will taunt with the minigun.

SCRIPT:
//SANDVICH DROP AND EAT SCRIPT

//Quick Sandvich toss
alias "+sandvichtoss" ";slot2;wait 50;+attack2;wait 50;-attack2"
alias "-sandvichtoss" "-attack2"
bind "mouse4" "+sandvichtoss"

alias +sandvichtoss "slot2; +attack2
alias "-sandvich2" "voicemenu 0 1"
bind MOUSE4 +sandvich1
bind MOUSE3 +sandvich2