UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Mute Round sounds & Ambient music for some time

broken avatar :(
Created 8 years ago
by fusorf
0 Members and 1 Guest are viewing this topic.
3,918 views
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 25 July 2015
Last active: 2 years ago
Posts
121
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
//This is a comment
Signature
×
fusorf's Groups
fusorf's Contact & Social LinksfusorffusorfFireFusorf
Hi everyone,

Basically I wrote a script to play an easter egg song. But I would like to mute the ambient music and the round sounds while it's playing.

Thanks for the help ^^
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Code Snippet
Plaintext
level.eggs = 1;

Set that to 1, when song is playing and when song ends, set it to 0
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 25 July 2015
Last active: 2 years ago
Posts
121
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
//This is a comment
×
fusorf's Groups
fusorf's Contact & Social LinksfusorffusorfFireFusorf
Tried that, doesn't work :/ do I need to return it from my script's function to zombiemode ?
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Tried that, doesn't work :/ do I need to return it from my script's function to zombiemode ?

No? Its set on level. Show script and how are you setting ambient sounds?
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 25 July 2015
Last active: 2 years ago
Posts
121
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
//This is a comment
×
fusorf's Groups
fusorf's Contact & Social LinksfusorffusorfFireFusorf
Code Snippet
Plaintext
init()
{
level.song_playing_now = false;
level.eggs = 0;
level.trig_mus_count = 0;

trigs = getEntArray("radio_music_trigs","targetname");

for(i=0; i<trigs.size; i++)
{
trigs[i] thread watch_radio();
}
}

watch_radio()
{
self SetCursorHint("HINT_NOICON");
self playLoopSound("ee_song_loop");
self waittill("trigger", player);

playsoundatposition( "ee_song_affirm", player.origin );
self StopLoopSound();

level.trig_mus_count++;

if(level.song_playing_now == false && level.trig_mus_count == 3)
{
level.song_playing_now = true;
level.eggs = 1;
thread play_plr_song();
player waittill("song_done");

wait 0.1;
level.song_playing_now = false;
level.eggs = 0;
self delete();
}
}

play_plr_song()
{
players = get_players();
for(i=0; i<players.size; i++)
{
players[i] playsound("ee_song", "song_done");
}
}

there you go, sorry if it's messy ^^'
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Could you do instead of player waittill("song_done");, have wait for actual sound length? That should work at least, never used notify bit in playSound
Edit: Also, move self delete(); under if-statement, so the triggers get deleted correctly, lol. Just something I noticed while looking at script
Last Edit: September 03, 2016, 10:49:37 pm by HitmanVere
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 25 July 2015
Last active: 2 years ago
Posts
121
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
//This is a comment
×
fusorf's Groups
fusorf's Contact & Social LinksfusorffusorfFireFusorf
Thank you for your help HitmanVere :)

I did your changes. What I got working was that the round sounds are sucessfully disabled while the song is played.

However, the background music (mx_wave_1 overwritten with custom csv) keeps playing, even between rounds as they are no more round sounds to stop it. don't know if it makes sense xD

Fact is, when I trigger the song between rounds, the ambient music stops playing correctly. It seems that I can't stop it while it's playing.

But prehaps I could turn down the volume or something ? I don't know...

Btw you had 666 respects, I saved you by adding one ^^
Last Edit: September 04, 2016, 12:02:08 am by fusorf
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Thank you for your help HitmanVere :)

I did your changes. What I got working was that the round sounds are sucessfully disabled while the song is played.

However, the background music (mx_wave_1 overwritten with custom csv) keeps playing, even between rounds as they are no more round sounds to stop it. don't know if it makes sense xD

Fact is, when I trigger the song between rounds, the ambient music stops playing correctly. It seems that I can't stop it while it's playing.

But prehaps I could turn down the volume or something ? I don't know...

I think you can set something up in soundalias. Cant remember atm how, but there is a way to link them somehow

Btw you had 666 respects, I saved you by adding one ^^

Damn it, why did I answer to this topic :-\
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 25 July 2015
Last active: 2 years ago
Posts
121
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
//This is a comment
×
fusorf's Groups
fusorf's Contact & Social LinksfusorffusorfFireFusorf
I think you can set something up in soundalias. Cant remember atm how, but there is a way to link them somehow

Alright let me know, i'll try to see if I find anything :)

Damn it, why did I answer to this topic :-\

Oh so that's how you thank me ? :o then I would remove it if I could!

 
Loading ...