• 🏆 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!

How to Play Music Without Lagging Game?

Status
Not open for further replies.
Level 6
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 6
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