Music/SFX Audio Controller (Custom Event Set)

Discussion pertaining to resources, stories/characters and gameplay ideas in this forum dedicated to games that are just a faint glow.
Forum rules
Do not create a topic offering to produce resources. Click here for the reason.

Please use above resources section of site so everyone can have access to the resources you create.
User avatar
Koutacles
001 Subscriber
 
Joined: Fri Sep 08, 2006 9:54 pm
Location: NSW, Australia

Music/SFX Audio Controller (Custom Event Set)

Postby Koutacles » Mon Aug 29, 2016 12:54 am

Ahoy hoy! I've made a simple set of custom events that work with each other to easily control the volume of your game - especially independently controlling the volume of music and sound effects (SFX for short).

To use them, first create the Global Variables "GlobalMusicVolume" and "GlobalSFXVolume" (without quotes). Then create the switches "MusicIsMuted" and "SFXIsMuted" (also without quotes). Then import the events via 001's Resource Importer and away you go! It is recommended, where possible, to use the events provided to get/set the volume etc. and not the Global Variables or Switches directly.
All volumes are a number ranging from 0.0 to 1.0. The volume of music and SFX can be adjusted even while mute mode is on, and when mute is off they will use the new volume.

If you find any errors, let me know and I'll update as needed.

Find them here: http://engine001.com/resources.htm?u=Koutacles
Feel free to PM me and I'll send you an archive of all of them.

Currently there are:
-Get Music Volume (Returns 0 if music is muted, otherwise returns the volume)
-Get SFX Volume (Same as above, but for SFX)
-Get True Music Volume (Returns the music volume, even if muted)
-Get True SFX Volume (Same as above, but for SFX)
-Lower Music Volume (Lowers the music volume, even if muted)
-Lower SFX Volume (Same as above, but for SFX)
-Raise Music Volume (Raises the music volume, even if muted)
-Raise SFX Volume (Same as above, but for SFX)
-Set Music Mute (Directly turn mute on/off for music)
-Set SFX Mute (Same as above, but for SFX)
-Set Music Volume (Sets the music volume - note that 0 will make it silent but will NOT turn on mute mode)
-Set SFX Volume (Same as above, but for SFX)
-Toggle Music Mute (Toggles mute mode for music)
-Toggle SFX Mute (Same as above, but for SFX)
aka Chaoman77
Play Fungi Frolic!
Solve platforming puzzles and then make your own!
Play Endless Sands!
Gather gold in a deadly pyramid then (hopefully) return alive to spend it on sweet, sweet loot!

Return to Resource, Story and Level Design

Who is online

Users browsing this forum: No registered users

cron