Fortress Forever

Go Back   Fortress Forever > Community > Tips and Tutorials

Reply
 
Thread Tools Display Modes
Old 10-02-2007, 01:29 AM   #1
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quick Weapon All Classes

Default Key for the script is f
To change just change f to whatever key on all of the scripts:
Example: changing bind f "quickweapon" to bind g "quickweapon" changes key to g

Code:
//put in autoexec.cfg
bind f "quickweapon"

//Quick Weapon - put in demoman.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in engineer.cfg
alias quick1 "slot1; wait; alias quickweapon quick2"
alias quick2 "slot2; wait; alias quickweapon quick3"
alias quick3 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in hwguy.cfg
alias quick1 "slot5; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in medic.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in pyro.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in scout.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot2; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in Sniper.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


//Quick Weapon - put in soldier.cfg
alias quick1 "slot3; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1

Last edited by Dr.Satan; 10-02-2007 at 08:09 PM.
Dr.Satan is offline   Reply With Quote


Old 10-02-2007, 01:08 PM   #2
Industrial
 
Industrial's Avatar
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
you dont have to rebind this in every class config - you can do it once in cfg/autoexec.cfg and because the alias gets redefined it will function correctly for every class.
Industrial is offline   Reply With Quote


Old 10-02-2007, 02:48 PM   #3
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
I know, but i use different keys to change weapons for different classes, i just changed them all to one key on the script i posted here. like with my med it's f, but for solly i use mouse4, and for spy i use g...This way you can customize, but your right if you plan on leaving them all the same then just delete the bind line and put that in your autoexec.cfg
Dr.Satan is offline   Reply With Quote


Old 10-02-2007, 03:13 PM   #4
Paft
Beta Tester
 
Paft's Avatar
 
Join Date: Mar 2007
Location: UK - http://forums.fortress-forever.com
Class/Position: [O] Med
Gametype: CTF/Skills
Posts Rated Helpful 67 Times
Not that it matters, I'm sure this has been shown in a hundred other related threads. But a single thread is more belonging.

I'm curious to know how many people will think it's as practical or bother because the mousewheel is free (no need in mwheel bhop) to switch now. : )
Paft is offline   Reply With Quote


Old 10-02-2007, 03:28 PM   #5
fishBurger
get off my lawn
 
fishBurger's Avatar
 
Join Date: Mar 2007
Class/Position: O scout / demo
Gametype: killing
Posts Rated Helpful 0 Times
mousewheel is good, but slow. I use quickswitch (default q), and have a key bound to "hud_fastswitch 1; slot1; hud_fastswitch 0" to pull out the knife/crowbar/wrench.
__________________
That means that either you are an American, or you are NOT an American. There is no hyphenated exception. -Iggy
fishBurger is offline   Reply With Quote


Old 10-02-2007, 05:40 PM   #6
PorkChopVII
The "other" white meat....
 
PorkChopVII's Avatar
 
Join Date: Sep 2007
Location: Tulsa, Ok
Posts Rated Helpful 0 Times
not that im tryign to be picky, but for what reason do you enable then disable fast switch. my not just leave it enabled?
PorkChopVII is offline   Reply With Quote


Old 10-02-2007, 06:02 PM   #7
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by PorkChopVII
not that im tryign to be picky, but for what reason do you enable then disable fast switch. my not just leave it enabled?
how do you mean?
Dr.Satan is offline   Reply With Quote


Old 10-02-2007, 06:12 PM   #8
fishBurger
get off my lawn
 
fishBurger's Avatar
 
Join Date: Mar 2007
Class/Position: O scout / demo
Gametype: killing
Posts Rated Helpful 0 Times
I prefer quickswitch disabled. I like to scroll and select a weapon before pulling it out.
__________________
That means that either you are an American, or you are NOT an American. There is no hyphenated exception. -Iggy
fishBurger is offline   Reply With Quote


Old 10-02-2007, 06:22 PM   #9
Hammock
D&A Member
 
Join Date: Sep 2007
Posts Rated Helpful 13 Times
Quote:
Originally Posted by Industrial
you dont have to rebind this in every class config - you can do it once in cfg/autoexec.cfg and because the alias gets redefined it will function correctly for every class.
If you only bound this once in autoexec how does it know to change the original bound slot numbers?

For example if you put in autoexec

//Quick Weapon - put in demoman.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1
bind f "quickweapon"

that'd work for any class that switches between 4 + 5. But what about a class that switches between 3 + 1 ? How does the autoexec know to change that value if you only bind it once?

I basically have the exact same script in all my config files too (just different alias name) but I needed to put it into each class, because a) Each class used different slot numbers, b) some classes use different buttons to switch.

Cheers,
Hammock
Hammock is offline   Reply With Quote


Old 10-02-2007, 07:22 PM   #10
Industrial
 
Industrial's Avatar
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
only put
Code:
bind f "quickweapon"
in the autoexec and take it out of all class configs.
Industrial is offline   Reply With Quote


Old 10-02-2007, 07:38 PM   #11
PorkChopVII
The "other" white meat....
 
PorkChopVII's Avatar
 
Join Date: Sep 2007
Location: Tulsa, Ok
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Hammock
If you only bound this once in autoexec how does it know to change the original bound slot numbers?

For example if you put in autoexec

//Quick Weapon - put in demoman.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1
bind f "quickweapon"

that'd work for any class that switches between 4 + 5. But what about a class that switches between 3 + 1 ? How does the autoexec know to change that value if you only bind it once?

I basically have the exact same script in all my config files too (just different alias name) but I needed to put it into each class, because a) Each class used different slot numbers, b) some classes use different buttons to switch.

Cheers,
Hammock
Basicly sense the key isnt being changed just what slots, the variable name is not changing, just redefining the "quickchange" variable.

So in each class cfg you would only need the
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1

then change which slot numbers are going to be used for that class.

for example sniper what to quick switch between sniper rifle and AR
Quote:
alias quick1 "slot2; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1
would pace that in the sniper cfg. No need to add the

bind f "quickweapon"

because its already bound. Youre just changing what quickweapon does



Hope i was able to explain it better for you.
PorkChopVII is offline   Reply With Quote


Old 10-02-2007, 08:08 PM   #12
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
ah ok that did make more since. I agree that it's easier that way, the only reason it's there on every script (and i guess i should have changed it before i posted this) is b/c i use diferent keys for each class config.

Ex: my scout quickweapon button is f, however my soldier is mouse4, and my spy is g. This way i can change each to be specific for each class.

*edited script to remove redundancy
Dr.Satan is offline   Reply With Quote


Old 10-02-2007, 08:23 PM   #13
Credge
FF Loremaster
Beta Tester
 
Credge's Avatar
 
Join Date: Sep 2007
Posts Rated Helpful 4 Times
Couldn't you simply turn quick change on in the options?
Credge is offline   Reply With Quote


Old 10-02-2007, 08:50 PM   #14
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
you can, but I don't like to have to reach for the number keys...especially on my soldier need the fastest change i can so I use this so that i can bind the key to mouse4. Could also use lastinv, but if you change to something else then it messes it up. I mainly have it for my solly, demo, and engy, but i figured may as well do one for all the classes.
Dr.Satan is offline   Reply With Quote


Old 10-03-2007, 09:02 AM   #15
Industrial
 
Industrial's Avatar
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
if you'd need a fast change and then shoot with the mouse, changing with the mouse would be slower then doing it with the keyboard.

Also if you play with ESDF you can reach 1-5 fine.
Industrial is offline   Reply With Quote


Old 10-03-2007, 03:09 PM   #16
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
if you'd need a fast change and then shoot with the mouse, changing with the mouse would be slower then doing it with the keyboard.

Also if you play with ESDF you can reach 1-5 fine.
I'm not totally sure i know what you are saying here, but I'm assuming your saying that having to click the mouse to choose the weapon makes it slower? Not true. The script itself automatically changes to the weapon, no clicking needed.

Also I play with WASD, and i agree that it's not a huge thing to use the number keys, it's just a preference on my end. Also makes it extremely useful if you don't use WASD / ESDF. I used to (until just recently) play with the numpad (KP_UPARROW, etc) so i didn't have the luxory of using the number keys, and i had my mousewheel bound to more important keys so I made this config for TFC. Once FF came out I was pretty much custom to my TFC cfg's so I tried to incorporate as much of them into my FF configs as i could. Hence I kept the quickweapon script
Dr.Satan is offline   Reply With Quote


Old 10-03-2007, 07:56 PM   #17
Industrial
 
Industrial's Avatar
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
I should have explained better. If you use a script to change weapons to your secondary weapon (eg not switch+shoot) then it means you will need two mouse actions in a split second.

Say you are soldier and you need your ssg out ASAP to hit, having to press two different mouse buttons in quick succession with the same hand is slower then using two hands.

Oh wait, I do assume you use the mouse to quickswap.
Industrial is offline   Reply With Quote


Old 10-03-2007, 09:49 PM   #18
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by Industrial
Oh wait, I do assume you use the mouse to quickswap.
Depends on the class...solly i do, but i use mouse1 to attack and mouse4 is my quickweapon button, but i have never had a problem. I think it's quicker to just click with my thumb and then hit mouse1 then it is to have to reach up to the number keys. Especially if i am straffing or bhopping while i'm switching
Dr.Satan is offline   Reply With Quote


Old 10-10-2007, 12:14 AM   #19
punkrockrocks
When patch will out?
 
punkrockrocks's Avatar
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
i just turn on quickswitch and use the numbers.
they're right there above W for easy access and you know what they are for every class. to quickly switch between 2 weapons, use Q. i don't see the need for all this scripting.
__________________
MAKE MORE ESCAPE MAPS
Ingame: punkrock
Idle and support #nozoom, #ff.pickup
punkrockrocks is offline   Reply With Quote


Old 10-10-2007, 05:05 AM   #20
Hammock
D&A Member
 
Join Date: Sep 2007
Posts Rated Helpful 13 Times
Quote:
Originally Posted by punkrockrocks
i just turn on quickswitch and use the numbers.
they're right there above W for easy access and you know what they are for every class. to quickly switch between 2 weapons, use Q. i don't see the need for all this scripting.
If you just used Q for quick switching in the sense that it switches to your last weapon. That's not very usefull when you want specific weapons to be quick switched.

Most classes will switch between your primary weapon to super shotty (usually). If Q was just designed as a quick switch (previous weapon), then if you had a crowbar in between for some reason for example, you'd switch from the weapon you have back to the crowbar.

The scripting would ensure that Q switches between the two weapons you want between each class.

I just don't understand why you really need to only put the bind once in autoexec if you're already defining every alias in each class already, you're really only saving 1 line of code. It can't effect things that greatly saving 1 line of code in every config, can it?

Cheers,
Hammock
Hammock is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.