I’ve been thinking about incorporating music into my next map similar to what you might find in a singleplayer mission. It wouldn’t be a single song that loops throughout the level. I want to script it up so that the different stages of gameplay have different ambient and action music tracks (about 6-8 tracks of various lengths). Of course, this presents some potential issues on how to implement it.
Since you can’t loop global sounds, I could manually loop them through scripting. I did this on Mission Two with some sound effects, but I haven’t tried it before with long music files. I’ve ruled out using target_speakers, the music key/value pair in the worldspawn, and the playsound command. So, I’m planning on using the togglespeaker command with the .sps file and loop it manually in the script with various wait statements. I would attach the sound to it’s own script mover to try to limit the impact this might have on the rest of the script.
Obviously, some people just woudn’t want the music in there, or would want the ability to turn it off. I have that covered. And I would also probably put all the music in a separate .pk3 file so it would not have to be downloaded with the main map since my .pk3 files are usually big enough as it is.
I was wondering if anyone had any idea what kind of impact this might have with performance or gamestate. Or if you have a better way to incorporate global audio tracks that I am not aware of.
) and then see. you could easily create 1000 speakers by just copy and pasting the content of your .sps file and then just change origins.