Upvote Upvoted 0 Downvote Downvoted
viewmodel toggle request
posted in Customization
1
#1
0 Frags +

Hi, I recently switched my configs from the archaic, ancient competitive tf2 configs to a set generated by TF2Mate. I'm happy with my new set but I miss a feature from my old set where I could use the END key to toggle my viewmodels between all on, all off, and on/off based on personal preferences. I was wondering if somebody could help me figure out how to set a toggle for this kind of thing again.

Hi, I recently switched my configs from the archaic, ancient competitive tf2 configs to a set generated by TF2Mate. I'm happy with my new set but I miss a feature from my old set where I could use the END key to toggle my viewmodels between all on, all off, and on/off based on personal preferences. I was wondering if somebody could help me figure out how to set a toggle for this kind of thing again.
2
#2
3 Frags +

bindtoggle key r_drawviewmodel

bindtoggle key r_drawviewmodel
3
#3
1 Frags +

Come on dude you could have found this with a simple google search...

bindtoggle KEY "r_drawviewmodel"

edit: fucking ninjas man http://i.imgur.com/BLPG2wQ.png

Come on dude you could have found this with a simple google search...

bindtoggle KEY "r_drawviewmodel"


edit: fucking ninjas man http://i.imgur.com/BLPG2wQ.png
4
#4
0 Frags +

r_drawviewmodel 0;
r_drawtracers_firstperson 0;
alias "togglefovon" "viewmodel_fov 100(change to preference); alias fovtoggle togglefovoff"
alias "togglefovoff" "viewmodel_fov 0.1 ; alias fovtoggle togglefovon"
alias "fovtoggle" "togglefovon"
bind "KEY" "fovtoggle; toggle r_drawtracers_firstperson 0 1; toggle r_drawviewmodel 0 1"

r_drawviewmodel 0;
r_drawtracers_firstperson 0;
alias "togglefovon" "viewmodel_fov 100[b](change to preference)[/b]; alias fovtoggle togglefovoff"
alias "togglefovoff" "viewmodel_fov 0.1 ; alias fovtoggle togglefovon"
alias "fovtoggle" "togglefovon"
bind "KEY" "fovtoggle; toggle r_drawtracers_firstperson 0 1; toggle r_drawviewmodel 0 1"
5
#5
-4 Frags +
//Viewmodeltoggle Script
alias SON "echo VMT loaded..."
alias SOFF "echo VMT unloaded..."

bind mwheelup nextinv
bind mwheeldown previnv
bind e prevwep

bind 1 QLslot1
bind 2 QLslot2
bind 3 QLslot3
alias QLslot1 W1
alias QLslot2 W2
alias QLslot3 W3

alias W1 "r_drawviewmodel 1;slot1;alias vmodel "r_drawviewmodel 0";MwheelAliase1;LInvAliase1"
alias W2 "r_drawviewmodel 1;slot2;alias vmodel "r_drawviewmodel 0";MwheelAliase2;LInvAliase2"
alias W3 "r_drawviewmodel 1;slot3;alias vmodel "r_drawviewmodel 1";MwheelAliase3;LInvAliase3"

alias MwheelAliase1 "alias nextinv W3;alias previnv W2"
alias MwheelAliase2 "alias nextinv W1;alias previnv W3"
alias MwheelAliase3 "alias nextinv W2;alias previnv W1"

alias LInvAliase1 "alias prevwep lastW1;alias lastW2 W1;alias lastW3 W1"
alias LInvAliase2 "alias prevwep lastW2;alias lastW1 W2;alias lastW3 W2"
alias LInvAliase3 "alias prevwep lastW3;alias lastW1 W3;alias lastW2 W3"

alias VMTlever VMToff
alias VMToff "SOFF;alias VMTlever VMTon;r_drawviewmodel 1;alias vmodel "r_drawviewmodel 1";alias QLslot1 slot1;alias QLslot2 slot2;alias QLslot3 slot3;bind e lastinv;bind mwheelup invprev;bind mwheeldown invnext"
alias VMTon "exec VMT"

W1;SON

//If not having the following aliases set in another .cfg uncomment them
//bind mouse1 +primary
//bind mouse2 +secondary
//alias +primary "+attack;spec_next;vmodel";bind mouse1 +primary
//alias -primary "-attack"
//alias +secondary "+attack2;spec_prev;vmodel";bind mouse2 +secondary
//alias -secondary "-attack2"
[code]
//Viewmodeltoggle Script
alias SON "echo VMT loaded..."
alias SOFF "echo VMT unloaded..."

bind mwheelup nextinv
bind mwheeldown previnv
bind e prevwep

bind 1 QLslot1
bind 2 QLslot2
bind 3 QLslot3
alias QLslot1 W1
alias QLslot2 W2
alias QLslot3 W3

alias W1 "r_drawviewmodel 1;slot1;alias vmodel "r_drawviewmodel 0";MwheelAliase1;LInvAliase1"
alias W2 "r_drawviewmodel 1;slot2;alias vmodel "r_drawviewmodel 0";MwheelAliase2;LInvAliase2"
alias W3 "r_drawviewmodel 1;slot3;alias vmodel "r_drawviewmodel 1";MwheelAliase3;LInvAliase3"

alias MwheelAliase1 "alias nextinv W3;alias previnv W2"
alias MwheelAliase2 "alias nextinv W1;alias previnv W3"
alias MwheelAliase3 "alias nextinv W2;alias previnv W1"

alias LInvAliase1 "alias prevwep lastW1;alias lastW2 W1;alias lastW3 W1"
alias LInvAliase2 "alias prevwep lastW2;alias lastW1 W2;alias lastW3 W2"
alias LInvAliase3 "alias prevwep lastW3;alias lastW1 W3;alias lastW2 W3"

alias VMTlever VMToff
alias VMToff "SOFF;alias VMTlever VMTon;r_drawviewmodel 1;alias vmodel "r_drawviewmodel 1";alias QLslot1 slot1;alias QLslot2 slot2;alias QLslot3 slot3;bind e lastinv;bind mwheelup invprev;bind mwheeldown invnext"
alias VMTon "exec VMT"

W1;SON

//If not having the following aliases set in another .cfg uncomment them
//bind mouse1 +primary
//bind mouse2 +secondary
//alias +primary "+attack;spec_next;vmodel";bind mouse1 +primary
//alias -primary "-attack"
//alias +secondary "+attack2;spec_prev;vmodel";bind mouse2 +secondary
//alias -secondary "-attack2"
[/code]
6
#6
19 Frags +

I love how every post in this thread gets progressively more complicated

I love how every post in this thread gets progressively more complicated
7
#7
0 Frags +

that option is in flames config too
you can add me and ill set you up

that option is in flames config too
you can add me and ill set you up
8
#8
0 Frags +

jk im dumb

jk im dumb
9
#9
0 Frags +
alias view_model "view_on"
alias view_on "r_drawviewmodel 1;alias view_model view_off"
alias view_off "r_drawviewmodel 0;alias view_model view_on"
bind "SHIFT" view_model

This is what I use, use/modify to your liking!

[code]alias view_model "view_on"
alias view_on "r_drawviewmodel 1;alias view_model view_off"
alias view_off "r_drawviewmodel 0;alias view_model view_on"
bind "SHIFT" view_model[/code]

This is what I use, use/modify to your liking!
10
#10
0 Frags +
TwistedCome on dude you could have found this with a simple google search...

bindtoggle KEY "r_drawviewmodel"

edit: fucking ninjas man http://i.imgur.com/BLPG2wQ.png

If all I wanted was a button to turn viewmodels on and off I could have easily done that without asking for help...

Maybe I didn't explain it clearly enough:

Right now all of my classes have their own on/off for their slots 1/2/3/4 (for the most part this is off on all primary/secondaries, and on for melee). Using a button to toggle them on, I would have to hit that button every time I switched away and then back to a weapon that currently defaults to off. What I was hoping was to toggle through three different modes of what I have currently, "all on", and "all off".

I also specified that I was using a config generated by TF2mate because it uses its own set of aliases.

That said, thanks for the other responses, I'll be trying to get them to work within the framework of the cfg files I currently have.

[quote=Twisted]Come on dude you could have found this with a simple google search...

bindtoggle KEY "r_drawviewmodel"


edit: fucking ninjas man http://i.imgur.com/BLPG2wQ.png[/quote]

If all I wanted was a button to turn viewmodels on and off I could have easily done that without asking for help...

Maybe I didn't explain it clearly enough:

Right now all of my classes have their own on/off for their slots 1/2/3/4 (for the most part this is off on all primary/secondaries, and on for melee). Using a button to toggle them on, I would have to hit that button every time I switched away and then back to a weapon that currently defaults to off. What I was hoping was to toggle through three different modes of what I have currently, "all on", and "all off".

I also specified that I was using a config generated by TF2mate because it uses its own set of aliases.

That said, thanks for the other responses, I'll be trying to get them to work within the framework of the cfg files I currently have.
11
#11
0 Frags +

x

x
12
#12
3 Frags +
LiterallyAPandaI also specified that I was using a config generated by TF2mate because it uses its own set of aliases.

That said, thanks for the other responses, I'll be trying to get them to work within the framework of the cfg files I currently have.

Not gonna look up how TF2Mate names its shit because I'm lazy and it's dumb, but here's what you want:

It's split into three states, you can add change settings by changing the aliases such as state_one_slot1 where you see the settings. It starts in state one and hitting the cycle key will advance 2->3->1.

I'm not 100% sure if the key name is END either, easy to change though.

//State 1
//Change these three lines for state 1 settings
alias state_one_slot1 "slot1; r_drawviewmodel 0;"
alias state_one_slot2 "slot2; r_drawviewmodel 0;"
alias state_one_slot3 "slot3; r_drawviewmodel 1;"

alias state_one "alias c_slot1 state_one_slot1; alias c_slot2 state_one_slot2; alias c_slot3 state_one_slot3; alias cycle_key state_two"

//State 2
//Change these three lines for state 2 settings
alias state_two_slot1 "slot1; r_drawviewmodel 1;"
alias state_two_slot2 "slot2; r_drawviewmodel 1;"
alias state_two_slot3 "slot3; r_drawviewmodel 1;"

alias state_two "alias c_slot1 state_two_slot1; alias c_slot2 state_two_slot2; alias c_slot3 state_two_slot3; alias cycle_key state_three"

//State 3
//Change these three lines for state 3 settings
alias state_three_slot1 "slot1; r_drawviewmodel 0;"
alias state_three_slot2 "slot2; r_drawviewmodel 0;"
alias state_three_slot3 "slot3; r_drawviewmodel 0;"

alias state_three "alias c_slot1 state_three_slot1; alias c_slot2 state_three_slot2; alias c_slot3 state_three_slot3; alias cycle_key state_one"

//Binds
bind END cycle_key
bind 1 c_slot1
bind 2 c_slot2
bind 3 c_slot3

//Initialize
state_one

Doesn't include Q/Mousewheel, let me know if that's functionality you want.

[quote=LiterallyAPanda]
I also specified that I was using a config generated by TF2mate because it uses its own set of aliases.

That said, thanks for the other responses, I'll be trying to get them to work within the framework of the cfg files I currently have.[/quote]

Not gonna look up how TF2Mate names its shit because I'm lazy and it's dumb, but here's what you want:

It's split into three states, you can add change settings by changing the aliases such as state_one_slot1 where you see the settings. It starts in state one and hitting the cycle key will advance 2->3->1.

I'm not 100% sure if the key name is END either, easy to change though.
[code]//State 1
//Change these three lines for state 1 settings
alias state_one_slot1 "slot1; r_drawviewmodel 0;"
alias state_one_slot2 "slot2; r_drawviewmodel 0;"
alias state_one_slot3 "slot3; r_drawviewmodel 1;"

alias state_one "alias c_slot1 state_one_slot1; alias c_slot2 state_one_slot2; alias c_slot3 state_one_slot3; alias cycle_key state_two"

//State 2
//Change these three lines for state 2 settings
alias state_two_slot1 "slot1; r_drawviewmodel 1;"
alias state_two_slot2 "slot2; r_drawviewmodel 1;"
alias state_two_slot3 "slot3; r_drawviewmodel 1;"

alias state_two "alias c_slot1 state_two_slot1; alias c_slot2 state_two_slot2; alias c_slot3 state_two_slot3; alias cycle_key state_three"

//State 3
//Change these three lines for state 3 settings
alias state_three_slot1 "slot1; r_drawviewmodel 0;"
alias state_three_slot2 "slot2; r_drawviewmodel 0;"
alias state_three_slot3 "slot3; r_drawviewmodel 0;"

alias state_three "alias c_slot1 state_three_slot1; alias c_slot2 state_three_slot2; alias c_slot3 state_three_slot3; alias cycle_key state_one"

//Binds
bind END cycle_key
bind 1 c_slot1
bind 2 c_slot2
bind 3 c_slot3

//Initialize
state_one[/code]

Doesn't include Q/Mousewheel, let me know if that's functionality you want.
13
#13
0 Frags +

I think this looks close to what I'm looking for. On a couple of classes though I have their primaries on (spy for visual cloak purposes, heavy to track spin-up). Would I have to set up a separate set of "state one" aliases for every class in this instance?

EDIT: Here's what I have from my old set of configs that used to work for me:

//default functionality
alias toggle_weapon_hide_key toggle_weapon_hide

alias toggle_weapon_hide_on "weapon_hide; alias weapon_hide_activator weapon_hide_activator_on; alias toggle_weapon_hide toggle_weapon_hide_all; echo Weapon Hide (select models) ON"
alias toggle_weapon_hide_all "weapon_hide_on; alias weapon_hide_activator weapon_hide_activator_all; alias toggle_weapon_hide toggle_weapon_hide_off; echo Weapon Hide All"
alias toggle_weapon_hide_off "weapon_hide_off; alias weapon_hide_activator weapon_hide_activator_off; alias toggle_weapon_hide toggle_weapon_hide_on; echo Weapon Hide OFF"

// stores the value for the toggle
alias weapon_hide_activator_on weapon_hide
alias weapon_hide_activator_all weapon_hide_on
alias weapon_hide_activator_off weapon_hide_off

alias weapon_hide ""
alias weapon_hide_on "r_drawviewmodel 0"
alias weapon_hide_off "r_drawviewmodel 1"

(in a separate binds cfg file)
bind "INS" "toggle_weapon_hide_key"

I had initially thought the issue lay in the fact that my current set of configs would just directly r_drawviewmodel 1/0 for each slot (slot 1/2/3), while the old ones would instead alias weapon_hide to a default setting for each slot (slot 1/2/3). If this proves problematic for people it's not really the most important thing to be able to toggle my viewmodels mid game, but at this point I'm curious to see if I can figure out something that works within my current cfg files.

I think this looks close to what I'm looking for. On a couple of classes though I have their primaries on (spy for visual cloak purposes, heavy to track spin-up). Would I have to set up a separate set of "state one" aliases for every class in this instance?

EDIT: Here's what I have from my old set of configs that used to work for me:

//default functionality
alias toggle_weapon_hide_key toggle_weapon_hide

alias toggle_weapon_hide_on "weapon_hide; alias weapon_hide_activator weapon_hide_activator_on; alias toggle_weapon_hide toggle_weapon_hide_all; echo Weapon Hide (select models) ON"
alias toggle_weapon_hide_all "weapon_hide_on; alias weapon_hide_activator weapon_hide_activator_all; alias toggle_weapon_hide toggle_weapon_hide_off; echo Weapon Hide All"
alias toggle_weapon_hide_off "weapon_hide_off; alias weapon_hide_activator weapon_hide_activator_off; alias toggle_weapon_hide toggle_weapon_hide_on; echo Weapon Hide OFF"

// stores the value for the toggle
alias weapon_hide_activator_on weapon_hide
alias weapon_hide_activator_all weapon_hide_on
alias weapon_hide_activator_off weapon_hide_off

alias weapon_hide ""
alias weapon_hide_on "r_drawviewmodel 0"
alias weapon_hide_off "r_drawviewmodel 1"

(in a separate binds cfg file)
bind "INS" "toggle_weapon_hide_key"

I had initially thought the issue lay in the fact that my current set of configs would just directly r_drawviewmodel 1/0 for each slot (slot 1/2/3), while the old ones would instead alias weapon_hide to a default setting for each slot (slot 1/2/3). If this proves problematic for people it's not really the most important thing to be able to toggle my viewmodels mid game, but at this point I'm curious to see if I can figure out something that works within my current cfg files.
14
#14
0 Frags +

tf2mate can be very unorganised and has a lot of commands in its weapon switching scripts that are not needed so I suggest trying to simplify it

This is an example of my scout cfg.
I use "i" as my button to switch viewmodels on and off by switching between the aliases view0 and view1.
I always have them enabled for melee weapons.
This method is the simplest I've come across but maybe other methods make more sense to you.

It's easy to customise for each different class cfg. just change the 1s to 0s and the 0s to 1s where needed.
Hopefully this can help :)

//SCOUT.CFG

// SPAWN WITH
slot1
r_drawviewmodel 0

// BINDS
alias weapon1 weapon1_0
alias weapon2 weapon2_0
alias weapon3 weapon3_1

bind mwheelup weapon1
bind mwheeldown weapon2
bind e weapon3

bind i view1

// ALIASES
alias weapon1_0 "slot1;r_drawviewmodel 0"
alias weapon1_1 "slot1;r_drawviewmodel 1"
alias weapon2_0 "slot2;r_drawviewmodel 0"
alias weapon2_1 "slot2;r_drawviewmodel 1"
alias weapon3_1 "slot3;r_drawviewmodel 1"

alias view1 "alias weapon1 weapon1_1;alias weapon2 weapon2_1;bind i view0"
alias view0 "alias weapon1 weapon1_0;alias weapon2 weapon2_0;bind i view1"

tf2mate can be very unorganised and has a lot of commands in its weapon switching scripts that are not needed so I suggest trying to simplify it

This is an example of my scout cfg.
I use "i" as my button to switch viewmodels on and off by switching between the aliases view0 and view1.
I always have them enabled for melee weapons.
This method is the simplest I've come across but maybe other methods make more sense to you.

It's easy to customise for each different class cfg. just change the 1s to 0s and the 0s to 1s where needed.
Hopefully this can help :)

//SCOUT.CFG

// SPAWN WITH
slot1
r_drawviewmodel 0

// BINDS
alias weapon1 weapon1_0
alias weapon2 weapon2_0
alias weapon3 weapon3_1

bind mwheelup weapon1
bind mwheeldown weapon2
bind e weapon3

bind i view1

// ALIASES
alias weapon1_0 "slot1;r_drawviewmodel 0"
alias weapon1_1 "slot1;r_drawviewmodel 1"
alias weapon2_0 "slot2;r_drawviewmodel 0"
alias weapon2_1 "slot2;r_drawviewmodel 1"
alias weapon3_1 "slot3;r_drawviewmodel 1"

alias view1 "alias weapon1 weapon1_1;alias weapon2 weapon2_1;bind i view0"
alias view0 "alias weapon1 weapon1_0;alias weapon2 weapon2_0;bind i view1"
Please sign in through STEAM to post a comment.