Page 1 of 1
Renegade's Volume Script
Posted: Sat Feb 07, 2009 6:44 pm
by Aasokeo
It says the script was made with HL commands, can anyone "convert" it to HL2? Or is there any alternative to such a useful script?
Re: Renegade's Volume Script
Posted: Sun Feb 08, 2009 4:06 am
by Renegade
It should work unaltered in HL2, all commands used in the script are the same in HL2. Let me know if it doesn't.
Re: Renegade's Volume Script
Posted: Sun Feb 08, 2009 12:25 pm
by Aasokeo
Hmm..I copypasted the script in its entirety into the HLDJ custom.cfg file (including the volume up/down binds), but they don't work in game. I even tried binding the two keys manually from the in-game console, but with no effect...
I'm not sure where I went wrong here..any ideas?
Re: Renegade's Volume Script
Posted: Sun Feb 08, 2009 5:03 pm
by Renegade
Remember that if you're using your keypad keys, NumLock needs to be on.
Re: Renegade's Volume Script
Posted: Sun Feb 08, 2009 5:38 pm
by Aasokeo
Well I can't remember a time when I had it off
This is what the cfg looks like..
Code: Select all
// Renegade's volume script
// set initial volume to 0.5 (or whatever you want)
volume 0.5
// set initial up/down aliases to 75/25 (or whatever you want)
alias game_volume_up vol_75
alias game_volume_down vol_25
// for each volume level, set a new volume, echo what the current level is,
// and specifiy which is the next level up and down.
alias vol_0 "volume 0.00; echo volume 0%; alias game_volume_up vol_25; alias game_volume_down vol_0"
alias vol_25 "volume 0.25; echo volume 25%; alias game_volume_up vol_50; alias game_volume_down vol_0"
alias vol_50 "volume 0.50; echo volume 50%; alias game_volume_up vol_75; alias game_volume_down vol_25"
alias vol_75 "volume 0.75; echo volume 75%; alias game_volume_up vol_100; alias game_volume_down vol_50"
alias vol_100 "volume 1.00; echo volume 100%; alias game_volume_up vol_100; alias game_volume_down vol_75"
// binds keypad up/down arrows to volume up/down
// set to whatever keys you want
bind KP_UPARROW game_volume_up
bind KP_DOWNARROW game_volume_down
As you can tell, i pretty much copy/pasted the same material from the other thread...unless I did something wrong

Re: Renegade's Volume Script
Posted: Sun Feb 08, 2009 10:14 pm
by Renegade
The only other thing I can think of is if an alias is being accidentally redefined elsewhere.
Try calling "game_volume_up" or "game_volume_down" directly from console to see if they perform as expected.