• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to stop background music instantly?

Status
Not open for further replies.
Level 4
Joined
Jun 18, 2008
Messages
70
Im working on a map. I made a trigger where if you type in -command, then it will change the music. The problem is that I can't figure out how to stop the music that is already playing. th music that is already playing is the default music.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
u could use these functions at map initialisation:
  • <event>
  • Bedingungen
  • Aktionen
    • Custom script: call SetAmbientDaySound( "" )
    • Custom script: call SetAmbientNightSound( "" )
    • Custom script: call SetMapMusic( "", false, 0 )
Credits to Waterknight from inwarcraft.de

Other than that, try to use Stop Music...
 
Level 4
Joined
Jun 18, 2008
Messages
70
I do, and then I gotta wait, but im using gui, so if jass works alot better for this I really dont get it,cause im not good @ jass. And I also dont get the custom scrpit part. Should I just put what you put?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I do, and then I gotta wait, but im using gui, so if jass works alot better for this I really dont get it,cause im not good @ jass. And I also dont get the custom scrpit part. Should I just put what you put?

Generally yes.
To explain what Emm-A- posted:
Custom script: call SetMapMusic( "", false, 0 )
Changes the map music to file located at "" (and since there is no file there, music is stoped).

Custom script: call SetAmbientDaySound( "" )
Custom script: call SetAmbientNightSound( "" )
Those two do the same, but with the sounds of day and night. It is not necessary to stop them.
 
Status
Not open for further replies.
Top