Discussions
Sign In
Forum rules
- please read before posting.
Mute music and sound
tinchopunk
October 2016
in
Technical Q&A
I have an option to mute music and sound, how can i setup this action script to do that. mute and sound. (its a button)
thanks
Comments
ChrisIceBox
October 2016
You'd need a
custom Action
or script that sets the volumes to zero. The code you want to call is:
AC.KickStarter.options.
SetVolume
(SoundType.Music, 0f); // Mute music
AC.KickStarter.options.
SetVolume
(SoundType.SFX, 0f); // Mute SFX
AC.KickStarter.options.
SetVolume
(SoundType.Speech, 0f); // Mute Speech
AC.KickStarter.options.
SetVolume
(SoundType.Music, 1f); // Unmute music
AC.KickStarter.options.
SetVolume
(SoundType.SFX, 1f); // Unmute SFX
AC.KickStarter.options.
SetVolume
(SoundType.Speech, 1f); // Unmute Speech
tinchopunk
October 2016
Thanks Chris as always!
Sign In
or
Register
to comment.
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Quick Links
Categories
Recent Discussions
Categories
12.6K
All Categories
66
Official news
1.5K
Engine development
10.6K
Technical Q&A
337
Games showcase
151
Extending the editor
229
Adventure talk
Welcome to the official forum for Adventure Creator.
Forum rules
Main website
Store page
Community wiki
Community Discord
Powered by Vanilla
Comments
AC.KickStarter.options.SetVolume (SoundType.Music, 0f); // Mute music
AC.KickStarter.options.SetVolume (SoundType.SFX, 0f); // Mute SFX
AC.KickStarter.options.SetVolume (SoundType.Speech, 0f); // Mute Speech
AC.KickStarter.options.SetVolume (SoundType.Music, 1f); // Unmute music
AC.KickStarter.options.SetVolume (SoundType.SFX, 1f); // Unmute SFX
AC.KickStarter.options.SetVolume (SoundType.Speech, 1f); // Unmute Speech