I want to add to control volume of music and such of the engine is there any thing to do it?]
How to assign sound cues or sound wavs a group audio group?
I want to add to control volume of music and such of the engine is there any thing to do it?]
How to assign sound cues or sound wavs a group audio group?
You can adjust the engine master volume like so:
class'Engine'.static.GetAudioDevice().TransientMasterVolume = DesiredMasterVolume;
What about audio groups, how to assign them?
Hello @Neongho
Man, I have done something simple, but useful for my game. As my game uses Arabic Musics, and many people who don’t understand arabic asked me if would be possible to just turn off the music, so I made a simple function, inside my custom Sacleform Pause Menu, which allows the user to turn off and on the music.
It’s far away from being a working music volume control system, but it does the job, and I always prefeer the most simple things I can do.
I will skip the scaleform part here, as it is a bit complicated, gave me a lot of headaches to get it working.
I simply created these 2 functions, inside UTPlayerController (yes, I use UTGame as the base class of my game, which I find much easier than creating new classes from scratch):
//custom functions to toggle music in-game///////////////////////////////
function TurnOffGameMusic()
{
ConsoleCommand("MODIFYSOUNDCLASS GameMusic VOL=0");
}
function TurnOnGameMusic()
{
ConsoleCommand("MODIFYSOUNDCLASS GameMusic VOL=0.50");
}
Now to assign a music (sound cue) to a specific sound group is very simple. Just inside the content browser, you right click over any sound cue, then search for the sound group option, there are many soundgroup already created. There is a soundgroup called Music, which is what I am using.
So the console command will change the volume of all sounds running in game which belong to the specified soundgroup (which is the same as soundclass).
I hope this helps you my brother!
Cheers!
Oh thanks, I will search for it… thanks a lot man, sometimes even the music it’s annoying for me…