I tried the following though it results in nothing in the weapon change script working (view models stay on when they should be off) etc
//numberkeys viewmodel
bind 3 "slot3; r_drawviewmodel 1; viewmodel_fov 90; cl_crosshair_file "crosshair7""
bind 1 "slot1; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file "crosshair7""
bind 2 "slot2; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file "crosshair5""
Is there an issue with how I have it spaced or something?
EDIT I'M RETARDED, I FORGOT THAT SOURCE ENGINE DOSN'T LIKE "" IN BETWEEN EACH OTHER OPPS
I tried the following though it results in nothing in the weapon change script working (view models stay on when they should be off) etc
//numberkeys viewmodel
bind 3 "slot3; r_drawviewmodel 1; viewmodel_fov 90; cl_crosshair_file "crosshair7""
bind 1 "slot1; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file "crosshair7""
bind 2 "slot2; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file "crosshair5""
Is there an issue with how I have it spaced or something?
EDIT I'M RETARDED, I FORGOT THAT SOURCE ENGINE DOSN'T LIKE "" IN BETWEEN EACH OTHER OPPS
you can only separate two things with a semicolon when you use the bind command, you'll need to make aliases and bind those to 1/2/3
also you can't nest quotations, "cl_crosshair_file "crosshair7"" doesn't work
you can only separate two things with a semicolon when you use the bind command, you'll need to make aliases and bind those to 1/2/3
also you can't nest quotations, "cl_crosshair_file "crosshair7"" doesn't work
fightyou can only separate two things with a semicolon when you use the bind command, you'll need to make aliases and bind those to 1/2/3
also you can't nest quotations, "cl_crosshair_file "crosshair7"" doesn't work
Thanks.
[quote=fight]you can only separate two things with a semicolon when you use the bind command, you'll need to make aliases and bind those to 1/2/3
also you can't nest quotations, "cl_crosshair_file "crosshair7"" doesn't work[/quote]
Thanks.
for reference you can't separate more than 2 things with a semicolon in general, so you'd want to make an alias with two commands, then bind the key to the other command you need and the alias
since you've got viewmodel_fov 90 for everything you don't need to redefine it with ever binding, just set that in your autoexec, and then you can do something like
alias gun "r_drawviewmodel 0;cl_crosshair_file crosshair7"
alias melee "r_drawviewmodel 1;cl_crosshair_file crosshair5"
bind 1 "gun;slot1"
bind 2 "gun;slot2"
bind 3 "melee;slot3"
this is off the top of my head, so if it doesn't work I apologize, but there's a handy page on the tf2 wiki about ingame scripting here
for reference you can't separate more than 2 things with a semicolon in general, so you'd want to make an alias with two commands, then bind the key to the other command you need and the alias
since you've got viewmodel_fov 90 for everything you don't need to redefine it with ever binding, just set that in your autoexec, and then you can do something like
alias gun "r_drawviewmodel 0;cl_crosshair_file crosshair7"
alias melee "r_drawviewmodel 1;cl_crosshair_file crosshair5"
bind 1 "gun;slot1"
bind 2 "gun;slot2"
bind 3 "melee;slot3"
this is off the top of my head, so if it doesn't work I apologize, but there's a handy page on the tf2 wiki about ingame scripting [url=https://wiki.teamfortress.com/wiki/Scripting]here[/url]
fightfor reference you can't separate more than 2 things with a semicolon in general, so you'd want to make an alias with two commands, then bind the key to the other command you need and the alias
You can definitely separate more than 2 things... you just keep adding semicolons. The only issue OP had was with the nested quotes.
bind 3 "slot3; r_drawviewmodel 1; viewmodel_fov 90; cl_crosshair_file crosshair7"
bind 1 "slot1; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file crosshair7"
bind 2 "slot2; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file crosshair5"
Should work.
Here's a much more in-depth page about scripting in TF2 to help you learn.
[quote=fight]for reference you can't separate more than 2 things with a semicolon in general, so you'd want to make an alias with two commands, then bind the key to the other command you need and the alias[/quote]
You can definitely separate more than 2 things... you just keep adding semicolons. The only issue OP had was with the nested quotes.
[code]bind 3 "slot3; r_drawviewmodel 1; viewmodel_fov 90; cl_crosshair_file crosshair7"
bind 1 "slot1; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file crosshair7"
bind 2 "slot2; r_drawviewmodel 0; viewmodel_fov 90; cl_crosshair_file crosshair5"[/code]
Should work.
[url=https://www.reddit.com/r/tf2scripthelp/wiki/index]Here's a much more in-depth page[/url] about scripting in TF2 to help you learn.