Construct 3 Audio Manager
This is a Construct 3 template project. You can either use it as a start point for your game or you can merge it with your project using Construct 3 Project Merger.
Audio Manager for Construct 3 is a Contruct 3 template project that contain fuctions that will help you with:
- Setting the volume and playing audio for 3 different channels (SFX, Music and Total)
- Manage persistend audio data
How to use it
Setting up the project
- Start a new project using the attached file in this page or merge this template with your project using Construct 3 Project Merger.
- Include the "audioManager_include" sheet into the sheet you want the template project resourcers to be available on
- Use the functions available in this template
Those functions are available to use as actions under the Functions plugin. Action functions doesn't return values.
- [Play SFX]
- string audio_name - Name of the audio file in the "Sounds" folder
- string channel - Channel the audio will play on. If there is already an SFX currently playing in this channel it'll be stoped before playing the new SFX
- boolean looping - Loop the SFX
- Description: Plays an audio in the "Sounds" folder
- [Play Music]
- string audio_name - Name of the audio file in the "Music" folder
- boolean looping - Loop the Music
- Description: Plays an audio in the "Music" folder
- [Stop Audio]
- string channel - Stops an audio playing in a channel (audio with the "channel" tag). Use this value as "music" if you want to stop the music that is currently playing
- Description: Stops a playing audio
- [Set Volume]
- string audio_type -
- number volume_value -
- Description: Set the "sfx", "music" or "total" volume
- [Save Audio Data]
- Description: Saves the audio data in the "relixesAudioManager" item from localstorage
- [Restart Audio Data]
- Description: Reset audio data to default values and remove stored data in the "relixesAudioManager" item from localstorage
Those functions are available to use as expressions using the "Functions" prefix anywhere you could use a expression. Expressions functions always returns a value.
- Description: Returns 1 if the Audio Manager has been loaded and is ready to use. Returns 0 otherwise
- Description - Returns 1 if the Audio Manager has just been loaded. Returns 0 otherwise (works like a trigger)
- string audio_type -Either "sfx", "music" or "total"
- Description: Get the volume value from a audio type
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.