Modme Forums

Hello, What I’m trying to do: I have a 1 hour long sound f

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: kingkenny
EDIT: I'm sorry, I accidentally messed up the title. It should say: "Play music when spawning and make it unstoppable?"
I didn't find a way to delete my post or edit the title. Maybe an admin can change it?

<hr>

Hello,

What I'm trying to do:

I have a 1 hour long sound file. I'm trying to make it play throughout the whole map. What I've tried to do is to link my audio file to "mus_roundstart_first_intro" but that doesn't work properly. The music will stop as soon as the first round is over.

How can i fix that or what would be the best way to get the background music into my map?

Thank you!


ModmeBot:

Reply By: tom5300
My guess is that when the game plays the second round's starting music, it stops/overwrites the first round's music.
So, I would try playing the sound independently with the following script:

level flag::wait_till( "initial_blackscreen_passed" );
thread zm_utility::really_play_2D_sound("NAME_OF_SOUND_GOES_HERE");
Also, change your sound's name from: "mus_roundstart_first_intro" to something else.


ModmeBot:

Reply By: modric
could also use erthrocks ambient sound system which loops the sound and doesnt get affected by round sounds... also use it for ambient stuff like wind and creaks etc


ModmeBot:

Reply By: Symbo
To remove the rounds sounds you can record a blank audio and specify in the alias this sound for every round sound.


ModmeBot:

Reply By: kingkenny

tom5300
My guess is that when the game plays the second round's starting music, it stops/overwrites the first round's music. So, I would try playing the sound independently with the following script: level flag::wait_till( "initial_blackscreen_passed" ); thread zm_utility::really_play_2D_sound("NAME_OF_SOUND_GOES_HERE"); Also, change your sound's name from: "mus_roundstart_first_intro" to something else.


Thank you!!


modric
could also use erthrocks ambient sound system which loops the sound and doesnt get affected by round sounds... also use it for ambient stuff like wind and creaks etc


i didn't know this exists. I'll take a look at it!

Symbo
To remove the rounds sounds you can record a blank audio and specify in the alias this sound for every round sound.


Thanks, i already do this on my timed-based maps!


ModmeBot:

Reply By: kingkenny

tom5300
My guess is that when the game plays the second round's starting music, it stops/overwrites the first round's music. So, I would try playing the sound independently with the following script: level flag::wait_till( "initial_blackscreen_passed" ); thread zm_utility::really_play_2D_sound("NAME_OF_SOUND_GOES_HERE"); Also, change your sound's name from: "mus_roundstart_first_intro" to something else.


That works but when i use "/fast_restart" in the console or "RESTART LEVEL" in the pause menu then the music from the last round will continue playing.
Any idea how to fix that?


ModmeBot:

Reply By: Scobalula

kingkenny
tom5300 My guess is that when the game plays the second round's starting music, it stops/overwrites the first round's music. So, I would try playing the sound independently with the following script: level flag::wait_till( "initial_blackscreen_passed" ); thread zm_utility::really_play_2D_sound("NAME_OF_SOUND_GOES_HERE"); Also, change your sound's name from: "mus_roundstart_first_intro" to something else. That works but when i use "/fast_restart" in the console or "RESTART LEVEL" in the pause menu then the music from the last round will continue playing.Any idea how to fix that?


That restart button is not available to players either unless you're using Porter's patched pause menu which uses map_restart as far as I know (which players should be using).

If players are executing fast_restart then any issues are on them as it's a developer command (and it causes other issues), it's only for testing purposes.


ModmeBot:

Reply By: kingkenny

Scobalula
kingkenny tom5300 My guess is that when the game plays the second round's starting music, it stops/overwrites the first round's music. So, I would try playing the sound independently with the following script: level flag::wait_till( "initial_blackscreen_passed" ); thread zm_utility::really_play_2D_sound("NAME_OF_SOUND_GOES_HERE"); Also, change your sound's name from: "mus_roundstart_first_intro" to something else. That works but when i use "/fast_restart" in the console or "RESTART LEVEL" in the pause menu then the music from the last round will continue playing.Any idea how to fix that? That restart button is not available to players either unless you're using Porter's patched pause menu which uses map_restart as far as I know (which players should be using). If players are executing fast_restart then any issues are on them as it's a developer command (and it causes other issues), it's only for testing purposes.


Makes sense, thanks!


ModmeBot:

Reply By: tom5300
You can add the following lines to your main() to prevent legit players from using the restart commands in the console:

ModVar( "fast_restart", 0 );
ModVar( "map_restart", 0 );