Below is the Readme file for the script. You can also get the script by clicking the download link which will inturn take you to github.
All credit must be given to me: Adam Balan.
Scripts may be used in comercial games
Set up your regions.
Turn on music with an array of regions. fadeout on others.
The above shows you how to quickly set up a set of regions that when touched music plays.
In the above, 19 plays the river BGS while 20 fades it out over 2 seconds.
So How is this done?
Paint some regions on the map, one set is for the music to fade in, the other is for the music to fade out. You can have multiple regions that fade in music and multiple that fade out music.
Create a parallel event that contains the script calls you see in the image, for example:
FlarePlayMusicOnRegionTouch.playMusic(, 'BGS', 'River', 50, 100, 0)
FlarePlayMusicOnRegionTouch.fadeOutOnRegions(, 'BGS', 2)
- Run the game. When the user touches region 19, BGS of River will play. How ever when the player touches region 20, all BGS's will be faded out over 2 seconds. > ## ATTN! > > I do not fade out BGS or any other music on map > transfer, thats for you to set up.