How do you lower Music volume but not sound volume?

FireCrocFireCroc Member, PRO Posts: 68

I have been stuggling with this the last few days and desperatly need some help..

I have imported mp3 files for music and ogg files for sound. Is it possible to lower the music volume and increase the Sound volume?

I tried setting the game.audio.music.volume to 0.3 but this also lowers the sound volume even if game.audio.sound.volume is set to 1. I also tried setting the sound in the actor but this did not help.

Please help.

Comments

  • bob loblawbob loblaw Member, PRO Posts: 793

    weird. your sound and music volumes should operate independently.

    i used individual controls to lower and raise each in my first game. in my second game i used a slider to act as a balance control (eg if music is 0.4 then sound is automatically set to 0.6 or 1-music volume), as i figured it was less fidgety and the user could just do the overall volume on their device.

    did you import you sounds as sounds, and music as music? (probably but no harm double checking)

  • FireCrocFireCroc Member, PRO Posts: 68

    Hi Bob,

    Thanks for your response.

    I dont import the files, I just drag and drop them in the Media section.

    Is there a setting I am missing? Do you set your volume and sound with game.audio.music.volume and game.audio.sound.volume?

    Also if I set game.audio.music.volume to 0. All sound is turned off. Looks like this is a global setting for all volume.

    By the way I like you idea about setting a slider control.👍️

  • bob loblawbob loblaw Member, PRO Posts: 793
    edited June 2021

    I use game.audio.sound/music.volume

    on my game with the slider, when music is 0, sound is 1, and it works (ie. any play sound behaviour with game.audio.sound.volume, will play the sound at full volume, and any music playing, and you can only have one play music behaviour playing at any time, won't be audible).

    yeah I like the slider too. thought it was a little pointless having dual volume/mute controls on screen and on the hardware (like I did on my first game) when the game player could just turn the volume up/down/on/off with their device's buttons. thought a sound balance might be more useful. looks good on the screen too.

    edit - I use the Mac desktop version, so if there's a glitch in the pc version, I wouldn't know.

  • FireCrocFireCroc Member, PRO Posts: 68

    yeah, Looks pretty straigtforward to use. I use PC version.

    Anyone with PC version that has this problem?

  • ArmellineArmelline Member, PRO Posts: 5,353

    The Mac creator version is deeply unreliable when it comes to sound volumes. Perhaps the same is true of the Windows version. Have you tested on device and see if the problem still occurs there? I find I get the results I expect on device but anything can happen in Creator.

  • FireCrocFireCroc Member, PRO Posts: 68

    Hi Armelline, Thanks for this. I am sorted now. Looks like Windows Creator is a problem. When I test on a device as you suggested it works.

    I hope GS can sort these bugs out. It gets frustrating when you spend hours trying to fix something that's not broken.😣

    Thanks all for your help. Appreciate your input👍️

Sign In or Register to comment.