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

Music Problem

Status
Not open for further replies.
Level 10
Joined
Sep 25, 2013
Messages
521
I have added two songs to my map but when i play online they tracks seem to often times overlap or bug out, its very unpleasant sounding when this happens. What is the best way to make a repeating music playlist. Here is the trigger, its run by the initialization trigger. Thank you for your time :)

  • Music
    • Events
    • Conditions
    • Actions
      • Sound - Play The_Lord_of_The_Rings_Rohan_Compressed <gen>
      • Sound - Set volume of The_Lord_of_The_Rings_Rohan_Compressed <gen> to 40.00%
      • Wait for The_Lord_of_The_Rings_Rohan_Compressed <gen> to be 2.00 seconds from finished playing
      • Sound - Stop The_Lord_of_The_Rings_Rohan_Compressed <gen> After fading
      • Sound - Play lord_of_the_rings___the_ride_of_the_rohirrim_Compressed <gen>
      • Sound - Set volume of lord_of_the_rings___the_ride_of_the_rohirrim_Compressed <gen> to 40.00%
      • Wait for lord_of_the_rings___the_ride_of_the_rohirrim_Compressed <gen> to be 2.00 seconds from finished playing
      • Sound - Stop lord_of_the_rings___the_ride_of_the_rohirrim_Compressed <gen> After fading
      • Trigger - Run (This trigger) (checking conditions)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
The issue is because of the wait.
The wait will have to be syncronized in order to work in multiplayer.
The actual duration of all waits is technically random and therefor has no guarantees when playing with others.
So the game sends a check to the other players checking if their wait also ended and then returning to you to actually continue with the actions.
Depending on latency, this can actually freeze the game when used in a crucial thing.

I suggest you to find another way for ALL waits in your map and avoid using them from now on.

For the solution, I have not really looked into music in WC3 so I dont know what would be best to use.
However, you may want to take a look at Music triggers instead of Sound.
You can start a timer when you play a music with the length of the music as duration.
Then when that timer expires, you can play a new music.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Avoid playing music through sound channels because it annoys people.

Thanks fine sir, I will remove those waits and use timers!
Which will also not work because timers are synchronized to the game tick yet the sound is synchronized with real time. It will keep playing through "waiting for player" dialogs and will also play at the same rate independent on game speed, both of which will cause it to go out of sync.

I believe WC3 music automatically does not allow you to play two songs at once. If you overwrite an internal piece of music with your import (and the import is the same format, bitdepth and bitrate) then you can play it as normal WC3 music through the music channel.
 
Level 10
Joined
Sep 25, 2013
Messages
521
Which will also not work because timers are synchronized to the game tick yet the sound is synchronized with real time. It will keep playing through "waiting for player" dialogs and will also play at the same rate independent on game speed, both of which will cause it to go out of sync.

So don't use timers? I tried using the songs as music files and not sound ones. They work as music, but the problem is i can't seem to get a playlist going. It only plays 1 song endlessly. Thanks for the help btw :)

and yeah you were right Published Shadow, mp3's work
 
Status
Not open for further replies.
Top