_____________________________________

About

_____________________________________

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 

  1. Start a new project using the attached file in this page or merge this template with your project using Construct 3 Project Merger.
  2. Include the "audioManager_include" sheet into the sheet you want the template project resourcers to be available on
  3. Use the functions available in this template

_______________________________________

Template Functions

_______________________________________

Action functions

Those functions are available to use as actions under the Functions plugin. Action functions doesn't return values.

  • [Play SFX]
  • Parameters:
    • 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]
  • Parameters:
    • 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]
  • Parameters:


    • 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]
  • Parameters:
    • string audio_type  -
    • number volume_value - 
  • Description: Set the "sfx", "music" or "total" volume
  • [Save Audio Data]
  • Parameters
    • none
  • Description: Saves the audio data in the "relixesAudioManager" item from localstorage
  • [Restart Audio Data]
  • Parameters:
    • none
  • Description: Reset audio data to default values and remove stored data in the "relixesAudioManager" item from localstorage

Expression functions

Those functions are available to use as expressions using the "Functions" prefix anywhere you could use a expression. Expressions functions always returns a value.

  • [Functions.isAudioManagerLoaded]
  • Parameters:
    • none
  • Description: Returns 1 if the Audio Manager has been loaded and is ready to use. Returns 0 otherwise
  • [Functions.onAudioManagerLoaded]
  • Paramters:
    • none
  • Description - Returns 1 if the Audio Manager has just been loaded. Returns 0 otherwise (works like a trigger)
  • [Functions.getAudioVolume]
  • Paramters:
    • string audio_type -Either "sfx", "music" or "total"
  • Description: Get the volume value from a audio type

Updated 26 days ago
StatusReleased
CategoryTool
PlatformsHTML5
Rating
(1)
AuthorRelixes
Made withConstruct

Download

Download NowName your own price

Click download now to get access to the following files:

Audio Manager v1.0.0.c3p 1 MB

Leave a comment

Log in with itch.io to leave a comment.