The Game Modding Community - Since 2001

Automated Weapon Viewmodels

A Config Script for Team Fortress 2

viewmodels off for set weapons

32 lines | 1 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Aliases - setting up the script

alias vm1 "r_drawviewmodel 1" // Default Primary Viewmodels
alias vm2 "r_drawviewmodel 1" // Default Secondary Viewmodels
alias vm3 "r_drawviewmodel 1" // Default Melee Viewmodels
alias eq_1 "eq_1f3"
alias eq_2 "eq_2f1"
alias eq_3 "eq_3f1"
alias sw ""
alias eq_1f2 "slot1;vm1;alias sw eq_2f1;alias eq_2 eq_2f1;alias eq_3 eq_3f1"
alias eq_1f3 "slot1;vm1;alias sw eq_3f1;alias eq_2 eq_2f1;alias eq_3 eq_3f1"
alias eq_2f1 "slot2;vm2;alias sw eq_1f2;alias eq_1 eq_1f2;alias eq_3 eq_3f2"
alias eq_2f3 "slot2;vm2;alias sw eq_3f2;alias eq_1 eq_1f2;alias eq_3 eq_3f2"
alias eq_3f1 "slot3;vm3;alias sw eq_1f3;alias eq_1 eq_1f3;alias eq_2 eq_2f3"
alias eq_3f2 "slot3;vm3;alias sw eq_2f3;alias eq_1 eq_1f3;alias eq_2 eq_2f3"

// Binds - binds the commands to keys

bind "1" "eq_1"
bind "2" "eq_2"
bind "3" "eq_3"
bind "q" "sw"


--------------------------------------------------


alias vm1 "r_drawviewmodel 1" // View Models: Primary
alias vm2 "r_drawviewmodel 1" // View Models: Secondary
alias vm3 "r_drawviewmodel 1" // View Models: Melee

eq_1f3 // Initialise
About: ====== A script that automates viewmodels off and on for each individual weapon for each individual class. "View Models" are the gun and hand(s) you see of your character on your screen. The script contains settings for which weapons you want view models to be off on. You could have your view model off for soldier primary, and on for soldier secondary or on for demoman primary. The turning off and on of view models is controlled with the 1, 2, 3 and Q keys on your keyboard (THATS RIGHT! This script works with Q too). So they happen instantly when you change weapon. There are a few viewmodel scripts like this, but when I first used one I couldn't find one that worked with Q (lastinv). So I wrote this one. Install: ======== There are two sections in the script code above, seperated by a line. The top section goes into your autoexec.cfg, and the bottom section goes into ALL your class specific config files. You edit the settings (which weapons view models are off for) in the class specific files. Script Home: ======== More Information on installation and use: [http://doodlesstuff.com/?script=vm](http://doodlesstuff.com/?script=vm "http://doodlesstuff.com/?script=vm")

Posts

  • 6y
    Chuzzy avatar
    Chuzzy Joined 6y ago
    Offline
    **Pros:** - Awesome script - Works well **Cons:** - No scroll wheel compatability - No viewmodel_fov compatability **Improvements:** - Add scroll wheel compatability and viewmodel_fov

    8

    Bad at games, bad at life
  • 6y
    FeelFreeToMockMe avatar
    FeelFreeToMockMe Joined 6y ago
    Offline
    211 points Ranked 18561st
    > > The thing that I'm sure you noticed was that this is very simply without "lastinv", but with it you have to rebuild the entire weapon switching format. I suspect that it breaks for engineer (slot4/5) when using lastinv. Regardless, it seems functional (although those names look rather obscure). One thing that you didn't make clear: The way you select which viewmodels you want on or off is to change 1s to 0s in the __class.cfg__ files. > > My script simulates "lastinv". It has rebound Q to a new command. My script works with Q. Engie slot4/slot5 does not break it. > > Thanks. can you change it so the q works normally? every time I press q I switch to melee :p or can you give me a fix? edit: (ignore what I said earlier) can you make it so Q acts normally AND changes fov still (if it even is possible) and could you also get it to work with scroll wheel, thanks ^^

    8.4

    dolan, pls
  • 6y
    Eruad_Zche avatar
    Eruad_Zche Joined 7y ago
    Offline
    357 points Ranked 12490th
    This would work great on randomized since sometimes your weapon blocks your view.

    10

    Bananite
  • 6y
    DougieDoodles avatar
    DougieDoodles Joined 7y ago
    Offline
    1,472 points Ranked 3502nd
    7 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    > **Posted by darkid** > The thing that I'm sure you noticed was that this is very simply without "lastinv", but with it you have to rebuild the entire weapon switching format. I suspect that it breaks for engineer (slot4/5) when using lastinv. Regardless, it seems functional (although those names look rather obscure). One thing that you didn't make clear: The way you select which viewmodels you want on or off is to change 1s to 0s in the __class.cfg__ files. My script simulates "lastinv". It has rebound Q to a new command. My script works with Q. Engie slot4/slot5 does not break it. Thanks.
  • 6y
    darkid avatar
    darkid Joined 7y ago
    Offline
    The thing that I'm sure you noticed was that this is very simply without "lastinv", but with it you have to rebuild the entire weapon switching format. I suspect that it breaks for engineer (slot4/5) when using lastinv. Regardless, it seems functional (although those names look rather obscure). One thing that you didn't make clear: The way you select which viewmodels you want on or off is to change 1s to 0s in the __class.cfg__ files.

    6.9

    • Thanks x 1
    Scripter

Embed

Share banner
Image URL:
HTML embed code:
BB embed code:
Markdown embed code:

Credits

Key Authors
Doodles
Writer

Submitter

DougieDoodles avatar
DougieDoodles Joined 7y ago
Offline
1,472 points Ranked 3502nd
7 medals 1 rare
  • 6 years a member Medal icon
  • Reached 1,000 Points Medal icon
  • One month a member Medal icon
  • 6 months a member Medal icon
  • 1 year a member Medal icon
  • 2 years a member Medal icon

DougieDoodles
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 13,537 Views
  • 5 Posts
  • 6y Submitted
  • 6y Modified

Scores

70 bScore
8.3 Rating

4 voters

Sign up to access this!

Greetings! Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Resistance is futile... Sign up now!

Already a Bananite? Login

bcp.crwdcntrl.net tracking pixel