Making Audio Slider for Music and Sound Channel?[SOLVED]

Started by Stranga, Sun 22/01/2017 14:22:32

Previous topic - Next topic

Stranga

Hello everyone.

I'm not sure on how to go about this. I have made the GUI for the settings menu with the sliders and the global variables for the audio channels. Now I have the music one working fine but the sound one isn't working at all. Has anyone made this before and if so could possibly help me wrap my head around this.

Thank you in advanced.

here is the script I have set up

Code: ags
global script

function game_start()
{
chansound = System.AudioChannels[3];
chanmusic = System.AudioChannels[2];
}

function SliderSound_OnChange(GUIControl *control)
{
   chansound.Volume= SliderSound.Value;
}


function SliderMusic_OnChange(GUIControl *control)
{
   chanmusic.Volume= SliderMusic.Value;
}

Khris


Stranga

Thanks for your help Khris. Where should I place that line of code?

Stranga

Quote from: Khris on Sun 22/01/2017 14:38:00
You need Game.SetAudioTypeVolume() afaik.

Thank you very much! Works perfectly! :)

SMF spam blocked by CleanTalk