Overlapping Looping Music/Sound effects

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
thebluejester
001 Enthusiast
 
Joined: Fri Jul 24, 2015 3:05 am

Overlapping Looping Music/Sound effects

Postby thebluejester » Thu May 19, 2016 1:29 am

Hi all!

I'm having a bit of a dilemma at the moment.
I have a little "system" that plays battle music when the player is in proximity of foes. At the moment when the foe leaves proximity or dies the music switches back to the maps default music.

What I really want is to be able to do is have the battle music AND the map music playing at the same time.
Music tracks don't allow two tracks to be played at once, and sound effects don't loop... So I'm stuck.

My only thought atm is having a speaker with a large radius in the centre of maps and turn it on or off? Do speakers loop? I don't really want to have a speaker for battles on each map, I'd rather have it run all through my custom script.

Thanks in advance for any aid!


P.S. The battle music isn't "music" as such, its more like a bass beat meant to be in the background; signalling danger but not actually changing the music.

User avatar
Dunce
001 Forum Master
 
Joined: Sun Apr 08, 2007 3:33 am
Location: Arkansas, USA

Re: Overlapping Looping Music/Sound effects

Postby Dunce » Thu May 19, 2016 4:55 am

Use the Play Music event instead, have it play both songs on Enter Map(a trigger in map properties). Set the bass beat to 0 volume. Then when you encounter enemies raise the volume of the bass beat.

To prevent the music from starting over when you enter a new map(if the song is the same there), just have a comparison branch check before if the music is already playing, and skip playing if it is.
Image

User avatar
thebluejester
001 Enthusiast
 
Joined: Fri Jul 24, 2015 3:05 am

Re: Overlapping Looping Music/Sound effects

Postby thebluejester » Thu May 19, 2016 5:37 am

Thank you!
When in the audio resources manager on music files it has "Maximum overlapping = 1" and you don't have the option to edit it. So I thought you couldn't have two audio tracks at once. But the ADD option in Play Music allows for multiple tracks. I could have spent days not realizing that. Thank you very much.

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Overlapping Looping Music/Sound effects

Postby Mr.Numbers » Thu May 19, 2016 10:21 am

"Maximum Overlap" affects how many times the same track can be played at once. It is "1" for all musics because you can only play the same song once, where as a sound effect you could have it being played multiple times at once (Hence why it is editable)
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron