• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Best way to loop music into my map?

Status
Not open for further replies.
Level 3
Joined
Jun 9, 2010
Messages
31
Right now, I have two imported songs playing into my map. To keep those two songs playing, I use a simple trigger that immediately stops the music at map initialization (not in this trigger, it's in the actual map initialization trigger that you start with in every WC3 map), and...well, you'll see from the picture below.

  • MusicIntro
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Sound - Play Cod4SadSong <gen>
      • Wait (Length of (Last played music)) seconds
      • Sound - Play Halo_2_Ost_Volume_2___Unforgotten____Fullsongs_net_u <gen>
      • Wait (Length of (Last played music)) seconds
      • Trigger - Run (This trigger) (checking conditions)
What's happening is, after the last song ends, there's a slight lag where the trigger restarts itself. Granted, from what I can remember the only time it did this was when I was playing Frozen Throne off of my schools network drive (thus everything the program does goes through the network first, and then to the computer).

What I'm asking you guys about, is, Is there a better way to code this, or use the World editor to play just those two songs continually for the entire game, that won't make it lag? I feel like there's a better way to do this, but I'm not entirely sure.

Thanks in advance for any help,

~Brent
 
Level 3
Joined
Jun 9, 2010
Messages
31
When the player enters a new area this is what I'll do:

  • Actions
    • Sound - Stop music Immediately
    • Sound - Clear the music list
    • Wait 0.10 seconds
    • Sound - Play A_Mountain <gen>
Very simple.

Ahh, so playing the music file automatically adds it to the music list? If so, If I added the "Wait-length of previous song" and then played the second track, would that make the music list 2 songs long, and play both of them continually?
 
Status
Not open for further replies.
Top