• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to play multiple custom music?

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Hi, I need a way to play custom music, have 3 or 4 pieces.
Already managed to import the mp3 and play in game, however I need it to randomly select one of them at a time. And wait (silence) for a while before it selects a new one.

Also, how do I remove the vanilla music? Its really getting on my nerves. I like to have silence between my soundtracks.
 
Level 4
Joined
Jan 11, 2008
Messages
55
Hi, I need a way to play custom music, have 3 or 4 pieces.
Already managed to import the mp3 and play in game, however I need it to randomly select one of them at a time. And wait (silence) for a while before it selects a new one.

Also, how do I remove the vanilla music? Its really getting on my nerves. I like to have silence between my soundtracks.

for the silence, p[lay an empty wav file between songs.

Set each sound into an array, then choose a random integer, if random int = 1, play song 1, ect
 
Here's one way:

Create four triggers named Song0, Song1, Song2, Song3. One for each song. Create a "Trigger Variable Array" in the variable editor. In your Events - Map Initialization trigger, put this:
  • Set Trig[0] = Song0
  • Set Trig[1] = Song1
  • Set Trig[2] = Song2
  • Set Trig[3] = Song3
Now, each of the triggers will have a wait period of the length of the song (which you can look up in the sound editor) and then a wait period of silence. For example, each trigger should look something like this:

  • Actions
    • Sound - Play (Music)
    • Sound - Clear the music list
    • -------- The above "clear music list" is so that it doesn't play twice --------
    • -------- The below is just an estimated wait time until the song stops playing and with, I don't know, 15 seconds of silence --------
    • Wait 240.00 Seconds
    • Trigger - Run (Trig[(Random integer between 0 and 3)])
Your map initilization should also have that "run random trigger" action after you define the triggers, so that it initializes the cycle.
 
Status
Not open for further replies.
Top