I'm making a map, and, to put it simply, I need to run a command when some music finishes (played via a playsound command), and my only solution at the moment is a huge room full of repeaters making a delay as long as the music, with the command block at the end, which would work, but, for obvious reasons, I don't really want to do that. Can anyone help? If you have any more questions, ask in the comments, and I'll try and get back to you. Thanks in advance!
Minecraft – How to run a command after some playsound music
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – Why is the /playsound command not working
- Minecraft – Noteblock sound with playsound command not working
- Minecraft – Help make the fast minecart unloader more compact
- Minecraft – playsound command for a jetpack
- Minecraft – How could i place fire on top of every similar block in a large area? Bedrock
Best Answer
You can create an structure like that:![enter image description here](https://i.stack.imgur.com/GalQ0.png)
And when music start to sound execute /time set command substracting 20 to 22340 by each seconds you want to delay the command.
For example:
If music duration is 10 seconds you must delay the command by 10 seconds so:
22340-(10*20) = 22140
So you must execute
/time set 22140
when music starts soundIf music duration is 17 seconds you must delay the command by 17 seconds so:
22340-(17*20) = 22000
So you must execute
/time set 22000
when music starts to soundI hope I've explained that clearly