Forum

TF2 Viewmodel help

Created 14th November 2012 @ 12:09

Add A Reply Pages: 1

Maks

I have recently seen the light of no viewmodels, but I do miss it for my melee weapons. and I’m not to good at the scriptings and such -connect and then an ip is about as advanced as I get- so how would I go about getting no viewmodels except for when I have my melee weapon out?

rytis

PrettyGay

try tf2mate, its very easy to set up

nTraum

\V/ Gold
LAME

tf2mate: http://clugu.com/tf2mate/
broesel’s crosshair switcher: http://code.google.com/p/broesels-crosshair-switcher/

feeling

ist doof

It’s very simple to do on your own actually. Create a defaultclass.cfg and add:
bind 1 "slot1;r_drawviewmodel 0"
bind 2 "slot2;r_drawviewmodel 0"
bind 3 "slot3;r_drawviewmodel 1"

(and all other keys that you switch weapons with bind x "slotx;r_drawviewmodel x")

Then type exec defaultclass.cfg as the first line in every single class config. If you wish for a specific weapon to be visible (let’s say Medigun), type bind 2 "slot2;r_drawviewmodel 1" (plus the other keys you use to switch to Medigun bind x "slot2;r_drawviewmodel 1") after exec defaultclass.cfg in the medic.cfg.

The advantage of this defaultclass.cfg approach is that if you want to change a certain setting for one class (for example cl_autoreload 0 when you’re spy), you type cl_autoreload 1 in the defaultclass.cfg and cl_autoreload 0 in the spy.cfg instead of having to type cl_autoreload 1 in all configs except spy.

Doesn’t work perfectly with lastinv/q though. If you want that, it’s fairly more complicated and you need to set tf_remember_activeweapon 1, which I find really inconvenient at times.


Last edited by feeling,

ondkaja

IKEA

Don’t use TF2mate, it gives you loads of stuff you didn’t ask for. It’s bloated with useless aliases and you will get a headache if you ever want to change anything in those scripts manually.

I’d recommend learning how to script yourself, it is actually not that complicated once you get down the basics. Knowing how to script is incredibly useful as well. Here’s a good guide on how to script: http://wiki.teamfortress.com/wiki/Scripting (just try to avoid to make/use scripts that aren’t useful, such as the rocket jumping script or the air strafing script, that is a surprisingly common mistake people new to scripting make).

Until then, just follow feeling blue’s instructions.

rytis

PrettyGay

Quoted from ondkaja

Don’t use TF2mate, it gives you loads of stuff you didn’t ask for. It’s bloated with useless aliases and you will get a headache if you ever want to change anything in those scripts manually.

I’d recommend learning how to script yourself, it is actually not that complicated once you get down the basics. Knowing how to script is incredibly useful as well. Here’s a good guide on how to script: http://wiki.teamfortress.com/wiki/Scripting (just try to avoid to make/use scripts that aren’t useful, such as the rocket jumping script or the air strafing script, that is a surprisingly common mistake people new to scripting make).

Until then, just follow feeling blue’s instructions.

I’ve found tf2mate very easy to edit. Dunno whats your problem

TWEEKARN\

ez-sports.ru

ask thalash for advanced viewmodels

Kvux

/./
LEGO

Quoted from TWEEKARN\

ask thalash for advanced viewmodels

hahaha
bind “p” “toggle r_drawviewmodel 0 1”


Last edited by Kvux,

feeling

ist doof

Quoted from feeling

Doesn’t work perfectly with lastinv/q though. If you want that, it’s fairly more complicated and you need to set tf_remember_activeweapon 1, which I find really inconvenient at times.

I just wrote something for myself. Basically, q switches between your primary and secondary weapon. That means, if you press q after having your melee out, you switch to your primary and if you press q again, you switch to your secondary instead of back to melee. Feel free to use it and ask questions here:

alias primary "slot1;r_drawviewmodel 0;alias nextweapon secondary"
alias secondary "slot2;r_drawviewmodel 0;alias nextweapon primary"
alias nextweapon "secondary"

bind 1 "primary"
bind 2 "secondary"
bind 3 "slot3;r_drawviewmodel 1;alias nextweapon primary"
bind q "nextweapon"

tf_remember_activeweapon "1"


Last edited by feeling,

msh

sup here
i have a question. i saw that models were like half-viewed in some clips, how can i make same?

broesel

LAME

Quoted from msh

sup here
i have a question. i saw that models were like half-viewed in some clips, how can i make same?

Quoted from TWEEKARN\

ask thalash for advanced viewmodels

Rdios

REVERTO

Quoted from feeling

[…]
I just wrote something for myself. Basically, q switches between your primary and secondary weapon. That means, if you press q after having your melee out, you switch to your primary and if you press q again, you switch to your secondary instead of back to melee. Feel free to use it and ask questions here:

alias primary "slot1;r_drawviewmodel 0;alias nextweapon secondary"
alias secondary "slot2;r_drawviewmodel 0;alias nextweapon primary"
alias nextweapon "secondary"

bind 1 "primary"
bind 2 "secondary"
bind 3 "slot3;r_drawviewmodel 1;alias nextweapon primary"
bind q "nextweapon"

tf_remember_activeweapon "1"

bind “1” “slot1; r_drawviewmodel 1; alias vaihto vaihtosecondary;”
bind “2” “slot2; r_drawviewmodel 0; alias vaihto vaihtoprimary;”
bind “3” “slot3; r_drawviewmodel 1; alias vaihto vaihtosecondary;”

alias vaihto “vaihtosecondary”

alias vaihtoprimary “slot1; r_drawviewmodel 1; alias vaihto vaihtosecondary”
alias vaihtosecondary “slot2; r_drawviewmodel 0; alias vaihto vaihtoprimary”

press 1 and 3 for viewmodel, 2 for none.
Just put this in your class cfg. but its going to work with all classes once you put it in one class cfg so put it in every class cfg and modify the 1´s and the 0´s.


Last edited by Rdios,

Un amour de Swann

Quoted from msh

sup here
i have a question. i saw that models were like half-viewed in some clips, how can i make same?

OpenPlugin by Casual

Jonte

Just use crosshair switcher, it is easy even for retards


Last edited by Jonte,

feeling

ist doof

Quoted from Rdios

[…]

bind “1” “slot1; r_drawviewmodel 1; alias vaihto vaihtosecondary;”
bind “2” “slot2; r_drawviewmodel 0; alias vaihto vaihtoprimary;”
bind “3” “slot3; r_drawviewmodel 1; alias vaihto vaihtosecondary;”

alias vaihto “vaihtosecondary”

alias vaihtoprimary “slot1; r_drawviewmodel 1; alias vaihto vaihtosecondary”
alias vaihtosecondary “slot2; r_drawviewmodel 0; alias vaihto vaihtoprimary”

press 1 and 3 for viewmodel, 2 for none.
Just put this in your class cfg. but its going to work with all classes once you put it in one class cfg so put it in every class cfg and modify the 1´s and the 0´s.

If you are trying to say that I plagiarised from this guy: Yes, the scripts look a lot alike but that’s how scripting works, there are only a few ways to do it. I still wrote it myself plus there is a little mistake in his script: After taking your melee out, vaihto (I assume that’s Q) will switch to your secondary and then back to your primary. This only makes sense for medic and maybe demoman. He’s lacking explanations, for example that tf_remember_activeweapon needs to be set to 1 for this to work. Also, my syntax is more elegant in the sense that I don’t repeat lines redundantly that have been aliased already. That’s why you can put my script into your defaultclass.cfg and only change the relevant aliases in the specific class configs.


Last edited by feeling,

Add A Reply Pages: 1