I've been working on custom maps with friends for almost 4 years now, and our latest project has custom music. The project is a PVP game, so minimal lag is important. To loop the music, we're using scoreboards, but because we have different music for different gamemodes and different music packs, the amount of scores constantly being checked and counted is enormous. Having tens of constantly counting timers is the furthest thing from efficient.
The syntax would remain the same,
/playsound <sound> <source> <targets> [<pos>] [<volume>] [<pitch>] <minVolume>
but there would be a boolean check at the end: [<loop>]. If true, the song would loop, if false or not specified, it would not.
On top of this, maybe to make it easier to implement, we could specify how many ticks the sound would play for before looping, [<length>]. This would be a float value and would keep the Mojang team from having to find a sound's length, and also give more flexibility to the user.
Going one step further, we could add a loop amount, [<loopAmount>]. This would be the number of times the sound is looped. If it's not specified, the loop amount would be infinite.
This could change the way map makers incorporate sound in their projects. From ambience, to music, to speech, the options are endless, and without the hassle and lag of traditional scoreboard looping mechanisms, adding these details would be essentially encouraged.
Please sign in to leave a comment.
3 Comments