• 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 Play Music Without Lagging Game?

Status
Not open for further replies.
Level 8
Joined
Oct 19, 2008
Messages
168
Everytime a trigger runs the Play Music - any default wc3 song, it lags the game for like half a second.

I looked up answers to this question and i saw something like leave it how it is and people will just think its the laggers lagging hahhhaha but no i cant do that



is there a certain order for the triggers or something?
I just have it as -Stop last playing music Then -Play Music-Whatever
 
Level 7
Joined
Mar 6, 2006
Messages
282
OK so I gotta ask: how large is the sound file and what type of file is it?

In any case, you could probably easily solve this with preloading the sound at map init (or at time elapsed 0.00, I forget). I can't write the function atm, but just google "warcraft 3 preload sound" or whatever, you basically just play the sound at the start of the game with zero volume, so no one hears it, but the lag from loading the sound will be taken care of on init.

Also, you might wanna be positive that there's nothing else that would lag in the trigger that plays the music, because I've never heard lag caused by playing sounds.
 
Level 8
Joined
Oct 19, 2008
Messages
168
No i figured it out, Icemanbo is right.

Using the triggers:
Sound - Immediately stop last playing music
Sound - Play new music

does not lag at all compared to

Sound - Stop last playing music after fading
Sound - Play new music


So yeah do not use Stop music after fading unless you put a few seconds wait after it
 
Status
Not open for further replies.
Top