DarknessFalls 9 Posted December 15, 2015 (edited) Flare Play Music On Region Touch vs 1.0 Download: here Credit: Darknessfalls 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([19], 'BGS', 'River', 50, 100, 0) FlarePlayMusicOnRegionTouch.fadeOutOnRegions([20], '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. Edited December 15, 2015 by DarknessFalls 1 Share this post Link to post Share on other sites
eatorl 16 Posted December 15, 2015 This is amazing! I want to compose something for this kind of mechanic only (I may be doing it in the following days and updating this post haha) Share this post Link to post Share on other sites
+ Chaosian 617 Posted December 15, 2015 Reminds me a bit of Ash Lake from Dark Souls. You could get some pretty cool cues going I bet. Share this post Link to post Share on other sites
DarknessFalls 9 Posted December 15, 2015 I built it because I have a large map in my game with lots of river points traversing through he map so I was like why not have the player touch regions as they get closer to turn on music and sound Share this post Link to post Share on other sites
eatorl 16 Posted December 16, 2015 (edited) Hi there! I tested it and it works and it is beautiful BUT in my musician head I just wanted to be able to have more "FlarePlayMusicOnRegionTouch.playMusic" commands available to: "Play A in zone 19, then fade out A in zone 20 and play B, then fade out B in zone 21 and play C, then fade out C in zone 22 and play D and so on..." So I could create an "evolving" musical experience. The user would be walking towards a zone/thing/place and with each step (various steps) the ambient would become more dramatic or more calm or more "action like". etc.Is it possible? I found it is not possible with the script as it is now because only one "FlarePlayMusicOnRegionTouch.playMusic" can be available hehe so, even if I put it in different events they would conflict and just the last one will be active, I guess that is simple code logic haha. I managed to "make it work" by setting the scripted event to be activated each time the player step on it but that is much like eventing and is like the same thing if I were not using your script, lol and it wouldn't work in large zones because I would need to set one event per tile, so.. no. I even thought of duplicating your script and change some lines so it could work as different scripts but with duplicated outcome, but then I opened the code and my mortal mind said nope. So.. what do you think? xD Sounds like a interesting thing to do with a script doesn't it? Doesn't matter anyway. Edited December 17, 2015 by eatorl Share this post Link to post Share on other sites
DarknessFalls 9 Posted December 17, 2015 Did it get working the way you want it to??? Share this post Link to post Share on other sites