[Tutorial]In game volume toggling

For PC Tutorials, game Tutorials, and general technical questions to be answered. if you think you know something useful then write it here!

[Tutorial]In game volume toggling

Postby Fcrate » Sat Jan 07, 2012 2:34 pm

Ok I was in the bathroom shitting, you're thinking: Too much information Fcrate, but well, nothing brings up new ideas like a good shit. :$
Had this idea of having volume toggle, mute and unmute buttons on my keyboard.
I know that some smart ass is about to say: I already have mute, volume up&volume down buttons on my keyboard, BUT:
It would be useful to be able to mute the game through a quick keystroke, to listen to some teamspeak useless banter, while still having your computer volume up, or be able to decrease the game's volume to hear some music without having to go through the menu and bullshit. see I'm lazy as fock, and that's why I made these:
Open your unnamedsoldier.cfg and add this at the end:
Code: Select all
alias mute "seta s_volume 0; bind m unmute"
alias unmute "seta s_volume 0.90; bind m mute"
bind m mute

Now whenever you press m, you mute the game sounds, press again, and game is back to maximum volume.
For Volume toggling:
Code: Select all
bind o volup
alias volup "seta s_volume 0.1; bind o volup2"
alias volup2 "seta s_volume 0.2; bind o volup3"
alias volup3 "seta s_volume 0.3; bind o volup4"
alias volup4 "seta s_volume 0.4; bind o volup5"
alias volup5 "seta s_volume 0.5; bind o volup6"
alias volup6 "seta s_volume 0.6; bind o volup7"
alias volup7 "seta s_volume 0.7; bind o volup8"
alias volup8 "seta s_volume 0.8; bind o volup9"
alias volup9 "seta s_volume 0.9; bind o volup0"
alias volup0 "seta s_volume 0; bind o volup"

now when you press o repeatedly it increases your volume till maximum, then mutes, and goes up again, so and so and so.
Good sh|t, right? :D

You could also do it like this, if you don't like to have many binds on your keyboard, for pressing by mistake, etc.
Code: Select all
alias mute "seta s_volume 0; altbind m unmute"
alias unmute "seta s_volume 0.90; altbind m mute"
altbind m mute

This way you press alt+m to mute, and alt+m again to unmute.
With the same concept, you could do this:
Code: Select all
altbind o volup
alias volup "seta s_volume 0.1; altbind o volup2"
alias volup2 "seta s_volume 0.2; altbind o volup3"
alias volup3 "seta s_volume 0.3; altbind o volup4"
alias volup4 "seta s_volume 0.4; altbind o volup5"
alias volup5 "seta s_volume 0.5; altbind o volup6"
alias volup6 "seta s_volume 0.6; altbind o volup7"
alias volup7 "seta s_volume 0.7; altbind o volup8"
alias volup8 "seta s_volume 0.8; altbind o volup9"
alias volup9 "seta s_volume 0.9; altbind o volup0"
alias volup0 "seta s_volume 0; altbind o volup"

Now alt+o increases volume, etc.
Have fun!
PS: Thanks for johnny for testing this for me, as I don't have mohaa on my lappy :P
هل إتخذت الغاب مثلي منزلاً دون القصور
فتتبعت السواقي وتسلقت الصخور
هل تحممت بعطره وتنشفت بنور
وشربت الفجر خمراً من كؤوس من أثير
User avatar
Fcrate
Server Admin
 
Posts: 2967
Joined: Wed Nov 02, 2011 6:26 am
Location: Alexandria, Egypt

Re: [Tutorial]In game volume toggling

Postby PaceMaker » Sat Jan 07, 2012 3:02 pm

Fcrate wrote:PS: Thanks for johnny for testing this for me, as I don't have mohaa on my lappy :P


Damn! Imagine this: You cloud connect with your shitty 64K connection, play with your shitty ping, while chatting shit on TS. Talking about SOME shitty situation! :shock: :mrgreen:
╔═╗──────╔╦═╦══╗──╔══╗──╔╗╔╗───╔═╗
║╬╠═╗╔═╦═╣║═╬║║╬═╦╬╗╗╠═╗║╚╝╠═╦╦╣═╬═╗
║╔╣╬╚╣═╣╩╬╬═╠║║╣║║╠╩╝║╬╚╣╔╗║╬║║╠═║╩╬╦╦╗
╚╝╚══╩═╩═╝╚═╩══╩╩═╩══╩══╩╝╚╩═╩═╩═╩═╩╩╩╝
User avatar
PaceMaker
Passepartout
 
Posts: 2571
Joined: Wed Nov 02, 2011 1:23 pm
Location: Greece

Re: [Tutorial]In game volume toggling

Postby TheOldSoldier » Sat Jan 07, 2012 4:56 pm

Clever stuff Fcrate!! Added the script into my file. Always like your tutorials. 8-|
User avatar
TheOldSoldier
No shit, Sherlock.
 
Posts: 2729
Joined: Fri Nov 04, 2011 11:17 am
Location: England

Re: [Tutorial]In game volume toggling

Postby Fcrate » Sat Jan 07, 2012 5:34 pm

Oldy wrote:Clever stuff Fcrate!! Added the script into my file. Always like your tutorials. 8-|

Cool, Its nice to know that at least one of you guys use the stuff I write here. lol
@ Pace: Your post literally stinks :P
هل إتخذت الغاب مثلي منزلاً دون القصور
فتتبعت السواقي وتسلقت الصخور
هل تحممت بعطره وتنشفت بنور
وشربت الفجر خمراً من كؤوس من أثير
User avatar
Fcrate
Server Admin
 
Posts: 2967
Joined: Wed Nov 02, 2011 6:26 am
Location: Alexandria, Egypt

Re: [Tutorial]In game volume toggling

Postby GurToRri » Sat Jan 07, 2012 5:47 pm

For this now I use the Crosshair pack that you can controlate the volume of game so easily :P
But Thank You for your effort and your work ;-) ;-)
My haters were the first who wanted to look like me.
User avatar
GurToRri
One more thing...
 
Posts: 2200
Joined: Sun Dec 18, 2011 8:21 pm
Location: Cruces, Barakaldo, Basque Country, Spain

Re: [Tutorial]In game volume toggling

Postby DexTer » Sun May 06, 2012 12:21 pm

(Y) (Y) Lol, Fcrate You almost seem too smart to me right now :D
The Angle Of Death
The Dark Defender
User avatar
DexTer
 
Posts: 122
Joined: Sat Mar 17, 2012 6:55 pm
Location: Egypt,cairo


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style by Webdesign www, książki księgarnia internetowa podręczniki