Team Fortress 2

Disguise Weapon Changer

This is a Script for Team Fortress 2 submitted by Wofiel.

SEX! Ok, we got your attention. Join GameBanana, one of the oldest mod sites, and maximize your browsing experience.

  • Subscribe: Get notified when Wofiel submits again.
  • Say Thanks: Show your appreciation by sending Wofiel points.
  • Post: Give Wofiel your thoughts on this Script.
  • Vote: Help Wofiel win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Interested?

Sign up

Already a Bananite? Login

Disguise Weapon Changer

Your disguise will wield the same weapon as you are!

74 lines | 3 kb | Raw Code
Font size:
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//IN SPY.CFG
exec undisguised
bind 1 fslot1
bind 2 fslot2
bind 3 fslot3
bind 4 fslot4
bind q flastinv
bind mwheelup upslot
bind mwheeldown downslot
primary

//IN UNDISGUISED.CFG
-attack
alias execprim ""
alias execseco ""
alias execmele ""
alias execpda1 "disguisemodifier"

bind mouse1 +attack
bind b "lastdisguise; disguisemodifier"

alias fslot1 primary
alias fslot2 secondary
alias fslot3 melee
alias fslot4 pda1
alias flastinv primary_to_secondary
alias upslot primary_to_pda1
alias downslot primary_to_secondary

alias primary "execprim; slot1; alias fslot1 primary; alias fslot2 primary_to_secondary; alias fslot3 primary_to_melee; alias fslot4 primary_to_pda1; alias upslot primary_to_pda1; alias downslot primary_to_secondary"
alias secondary "execseco; slot2; alias fslot2 secondary; alias fslot4 secondary_to_pda1; alias fslot1 secondary_to_primary; alias fslot3 secondary_to_melee; alias upslot secondary_to_primary; alias downslot secondary_to_melee"
alias melee "execmele; slot3; alias fslot3 melee; alias fslot4 melee_to_pda1; alias fslot2 melee_to_secondary; alias fslot1 melee_to_primary; alias upslot melee_to_secondary; alias downslot melee_to_pda1"
alias pda1 "execpda1; slot4; alias fslot4 pda1; alias fslot3 pda1_to_melee; alias fslot2 pda1_to_secondary; alias fslot1 pda1_to_primary; alias upslot pda1_to_melee; alias downslot pda1_to_primary"

alias primary_to_secondary "alias flastinv secondary_to_primary; secondary"
alias primary_to_melee "alias flastinv melee_to_primary; melee"
alias primary_to_pda1 "alias flastinv pda1_to_primary; pda1"

alias secondary_to_primary "alias flastinv primary_to_secondary; primary"
alias secondary_to_melee "alias flastinv melee_to_secondary; melee"
alias secondary_to_pda1 "alias flastinv pda1_to_secondary; pda1"

alias melee_to_primary "alias flastinv primary_to_melee; primary"
alias melee_to_secondary "alias flastinv secondary_to_melee; secondary"
alias melee_to_pda1 "alias flastinv pda1_to_melee; pda1"

alias pda1_to_primary "alias flastinv primary_to_pda1; primary"
alias pda1_to_secondary "alias flastinv secondary_to_pda1; secondary"
alias pda1_to_melee "alias flastinv melee_to_pda1; melee"

alias disguisemodifier "exec disguised"

//IN DISGUISED.CFG
alias execprim "lastdisguise;bind mouse1 +dattack"
alias execseco "lastdisguise;bind mouse1 +attack"
alias execmele "lastdisguise;bind mouse1 +dattack"
alias execpda1 ""

bind mouse1 "+dattack"
bind b "lastdisguise; undisguisemodifier"

alias +dattack "+attack"
alias -dattack "-attack;undisguisemodifier"
alias undisguisemodifier "exec undisguised"

//IN EVERY OTHER CLASS .CFG
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind mwheelup invprev
bind mwheeldown invnext
bind q lastinv
bind mouse1 +attack
This script makes whatever you're disguised as switch weapons at the same time as you do, instead of switching to a weapon and pressing B.

This is kind of based on my Weapon Aliasing script, but a bit more complex because it's pretty much is two of those scripts in one. So if you use the original Weapon Aliasing script (which I doubt) and want this, you'll have to modify it a bit.

You need to create two more .cfgs to make this work, disguised.cfg and undisguised.cfg and will also require you to fix your binds in every other class .cfg.

To use in game: Nothing at all, this will work without any user interaction, but, you can press B to toggle whether or not you want the disguise to switch weapons. (Until you press B again, or disguise again)

The only bug in this script is that scrolling up twice while undisguised will put on whatever your last disguise was. Unfortunately I can't see a way around this.

  • You must be a member

Share

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

More embeddable images

Bookmark and Share
About this module
This module lists all those involved in the creation of this Script.

Credits

Key Authors
Wofiel
Author

Submitter

Wofiel avatar
Wofiel Offline
Member Joined 7 years ago
128 points Ranked 19692nd

Wofiel
Creator
About this module
This module lets you send a private message to the submitter (Wofiel).
About this module
This module displays what game this Script is for.

Game

About this module
This module displays this Script's category.

Category

Stats

Posts
0
Views
1,738
Date Added
6 years ago
Feb 27 2010 @ 1:03pm UTC