For my pvp map that is currently under-construction, I wanted to add background music to my map. I figured out a way to do this with resource pack sounds and the /playsound command. Only problem is I need the song to loop, and eventually end. Is there a way to remove the sound/music that is being played with command blocks? If there isn't, is there a way to detect it? If even that isn't feasible, is it possible to overlap the music with another sound effect (such as a pig sound) to overwrite it, and thus stop it?
You cannot stop music from playing, detect music that is currently playing (apart from the success of a command block when initiated), nor can you stop sounds by playing other sounds.
For my pvp map that is currently under-construction, I wanted to add background music to my map. I figured out a way to do this with resource pack sounds and the /playsound command. Only problem is I need the song to loop, and eventually end. Is there a way to remove the sound/music that is being played with command blocks? If there isn't, is there a way to detect it? If even that isn't feasible, is it possible to overlap the music with another sound effect (such as a pig sound) to overwrite it, and thus stop it?
You cannot stop music from playing, detect music that is currently playing (apart from the success of a command block when initiated), nor can you stop sounds by playing other sounds.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
You will simply have to create a timer for how long the music is playing and set that kind of a loop up
Is it possible to adjust the volume of the music so that it can only be heard in one area?