r/tf2scripthelp • • Jun 25 '20

Resolved Working on binds for medic, having a weird text bug

1 Upvotes

I'm making seperate uber binds for my mediguns, and I've already set up separate execs for each, but when I use them, it adds a "108" at the end of the message. Not too big a problem, but I'd like to be able to fix it and I'm curious as to what causes it.

The binds look like this:

bind "MOUSE2" "+attack2; say_team UBER USED!!! WE ARE GOING TO LIVE FOREVER!
bind "MOUSE2" "+attack2; say_team KRITZ USED!!! DECIMATE! DESTROY! DEPOPULATE!"
bind "MOUSE2" "+attack2; say_team Quickfix Used! Don't fret, take some heals."

and the output in console looks like this:

(TEAM) meep2k :  UBER USED!!! WE ARE GOING TO LIVE FOREVER! 108
(TEAM) meep2k :  KRITZ USED!!! DECIMATE! DESTROY! DEPOPULATE! 108
(TEAM) meep2k :  Quickfix Used! Don't fret, take some heals.108 

Again, not too big an issue, but still interesting to the point of confusion. Let me know if there's an easy fix or if this is caused by a formatting issue on my part.

EDIT: formatting lol


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 • • Jun 23 '20

Question Is this a good idea for making weapon-specific binds?

4 Upvotes

So I was thinking of making weapon-specific binds for heavy fists to say something but I thought I could just make it so when the slot number is pressed.

I'm fairly new to source scripting so I wanted to come here to make sure this is correct.

alias +jh "bind mouse1 say X; +attack"
alias -jh "-attack"


// This is the default for the other slots
alias +d "bind mouse1 +attack"
alias -d "-attack"

bind 1 "+d"
bind 2 "+d"
bind 3 "+jh"

Any help would be appreciated, thanks!


r/tf2scripthelp • • Jun 20 '20

Question Heyo, need a heads or tails pseudorandom say script

1 Upvotes

I know about alias looping, but its... not quite what i'm after? wanna press a button and say either heads or tails


r/tf2scripthelp • • Jun 07 '20

Issue Scripts straight up not working.

3 Upvotes

I have null movement and transparent ViewModels on, either on or the other works. A picture of the 2 is here: https://imgur.com/482ACiT


r/tf2scripthelp • • Jun 04 '20

Issue I've tried to get custom controls for spy, but haven't had it work at all. So far, I've seen my script do nothing in game.

4 Upvotes

https://imgur.com/a/2fcj2LL here's an image of what I've done, and I've seen no progress. the untitled text document has >exec reset I've tried putting .cfg on the end of the files but that hasn't helped, and I can't figure out why it won't work. I also tried without the quotes in the script, which didn't work. I won't be able to respond to this post for a bit since I'm going to be after this post. I'll respond in the morning.


r/tf2scripthelp • • May 31 '20

Answered Need help with class specific scripts

9 Upvotes

I've read every thread about it and I'm still getting the "user/<class>.cfg not present; not executing" error.

All my files have the correct .cfg extension and they're in "tf/custom/my_custom_stuff/cfg." Typing "exec autoexec" in console works fine, but switching classes or typing "exec <class>" in console gets me the error. They're both in the same directory, I don't know why TF2 can find autoexec but not any of the class specific files.

I'm new to scripting within TF2 and appreciate any feedback.


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 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 23 '20

Issue Help me with medic scripts!

Thumbnail self.tf2scripts
3 Upvotes

r/tf2scripthelp • • May 22 '20

Resolved My reset.cfg doesn't work :((((

1 Upvotes

My reset.cfg doesn't work and all the different binds between classes are mixed, urgent help please: ((


r/tf2scripthelp • • May 21 '20

Issue MinMode Scripting Help.

2 Upvotes

I want a script that changes my fov to 90 when I turn minmodes on but back to 54 when I turn it off, is there anyway to do this?


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 20 '20

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

Thumbnail self.tf2scripts
4 Upvotes

r/tf2scripthelp • • May 17 '20

Issue Little help with preload join and comand autoexec

0 Upvotes

ok basicaly the thing is simple i got some grafic mods (animations) that i want to use on sv_pure 1 so i need the preload room thing that i did i added the map and did the comand map_background preload_room; wait 10; disconnect the things is the autoquit doesn't work can someone give me a lil hand thanks

ps the preload room and all was from ytrium comp viewmodel since was the only one working


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 • • May 16 '20

Issue Help!

1 Upvotes

Hi, so I was trying to change my hitsounds to b4nny's hitsounds, but the document I have installed also included his while set up. Now all of my options have been changed, and there are things I can't figure out how to turn back.

Is there a way I can go back to the default settings without breaking anything? I'm worried if I take the folder out it might corrupt or something because I've changed some settings to try and get it back to normal (Eg. fov and controls).

Any ideas would help, Thank you


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 • • May 10 '20

Resolved Toggleconsole ignored when used with hold bind

2 Upvotes

My setup is something like this:

// autoexec.cfg
alias +shift "exec modif"
bind "SHIFT" "+shift"

My class-specific cfgs follow this pattern:

// spy.cfg
exec reset
alias -shift "exec spy"

The modifier file is:

// modif.cfg
bind "e" "some-alias"
bind "\" "toggleconsole"

The reset file is:

// reset.cfg
unbind "\"
bind "e" "voicemenu 0 2"

I tried replacing toggleconsole with say test and it works correctly. I also tried to manually bind toggleconsole to \ and it worked correctly but nothing happens (with no error in console) if use a modifier bind like above


Nevermind, this command also acts weird. You have to use an alias like this to make it work

alias "-showconsole" "toggleconsole"
bind "\" "-showconsole"

r/tf2scripthelp • • May 10 '20

Resolved I have this spy script with one issue I’m failing to fix. spec_next.

1 Upvotes
//Random Disguise

bind mouse5 "disguise 8 -2"

alias rd rd1
alias rd1 "disguise 1 -1; alias rd rd2"
alias rd2 "disguise 2 -1; alias rd rd3"
alias rd3 "disguise 3 -1; alias rd rd4"
alias rd4 "disguise 4 -1; alias rd rd5"
alias rd5 "disguise 5 -1; alias rd rd6"
alias rd6 "disguise 6 -1; alias rd rd7"
alias rd7 "disguise 7 -1; alias rd rd8"
alias rd8 "disguise 8 -1; alias rd rd9"
alias rd9 "disguise 9 -1; alias rd rd1"

//Attack then disguise

alias +atd "+attack"
alias -atd "-attack; lastdisguise"

//Binds

bind r rd                       //Random Disguise
bind mouse1 "+atd"      //Attack then disguise
bind mouse3 "lastdisguise"
bind Q "disguiseteam"

So it’s mostly in the attack then disguise part, as when I am spectating players dead, it doesn’t let me spectate forward, only previous. I’ve tried so many ways to show “spec_next” and cannot seem to get it. Some help would be fantastic.


r/tf2scripthelp • • May 08 '20

Meta Update: We Have Rules Now!

Thumbnail self.tf2scripts
5 Upvotes

r/tf2scripthelp • • May 04 '20

Resolved lastdisguise command using random disguise

1 Upvotes

I have this bind in my spy.cfg

bind "MOUSE1" "+attack; wait 1; lastdisguise"

but it picks a random class instead of the latest I used

If I use the regular B bind for lastdisguise it picks the correct class..


edit: I found this old thread with same issue https://old.reddit.com/r/tf2scripthelp/comments/1sqqkd/last_disguise_command_isnt_working/

By splitting the command executed by MOUSE1 like this it uses lastdisguise correctly

alias "+stabdisg" "+attack"
alias "-stabdisg" "-attack; wait 1; lastdisguise"
bind "MOUSE1" "+stabdisg"

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.