Volume control (20% -> 80%)
This sounds simple but bizarrely google doesn't give any easy results.
I need a macro that once hit it gives audio to 80%. (global audio) When hit again it gives 20%. It can be two macros, it doesn't matter. Is there such a command at all? :banana: |
You could make a macro that checks your current volume level first, but that might be a little too complicated.
I use this: Code:
SlashCmdList.VOLUME = function(val) |
Quote:
Code:
/run local MV = GetCVar("Sound_MasterVolume") if MV == "0.2" then SetCVar("Sound_MasterVolume", 0.8) elseif MV == "0.8" then SetCVar("Sound_MasterVolume", 0.2) else SetCVar("Sound_MasterVolume", 0.8) end 80% if it is at 20% 20% if it is at 80% 80% if it is at any other value |
does this also work? (provided it's already at 0.2 or 0.8)
Code:
/run local a="Sound_MasterVolume"SetCVar(a,1-GetCVar(a)) |
Quote:
Code:
/run SetCVar("Sound_MasterVolume",1-GetCVar("Sound_MasterVolume")) Code:
/run SetCVar("Sound_MasterVolume", 0.2) /edit: Ketho's script works because .2 + .8 = 1 :) If you want other values (that don't add up to 1), then you'd need a different script. |
All times are GMT -6. The time now is 08:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI