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

Status
Not open for further replies.
I would like to have a song imported into the game files, then I want the song to start as soon as the game starts. This is because I want all of the players to be in tune with whats going on in the music as they all share the same beats.

The problems:
1= How to import music file?
2= How to turn off existing game music?
3= How to loop or singleplay a music file I imported?

Thanks in advance, even if you know one answer to these question you can reply
 
Level 5
Joined
Nov 13, 2017
Messages
17
1. Go to import manager in the editor or whatever it’s called. Click File>import file and search on your computer for your mp3 or flac music file. Then you should see the imported music in the sound editor. The sound editor is in the same tab as the object editor and unit editor.

In the sound editor, right click your imported file at the bottom and click “use as music.” Now you can use it with triggers.

In the trigger editor make an effect called “Sound - Play music” and select your imported file. To loop the music set an event to Timer-every however long your music file is. Then set an effect to Sound- Music List or Whatever it’s called and play your imported music starting from 0.

Turning off the game music happens whenever you play your own music.

You know if a player alt tabs, it turns off the music right? Are you sure you want to revolve a map around music? Maybe try using music as sound effects instead?
 
Last edited:
Somehow I managed to do it,
You have no idea how thankfull I am right now I'v been trying to insert music into my maps for years!.

Actions
Sound - Clear the music list
Sound - Stop the currently playing music theme
Sound - Stop music Immediately
Sound - Set music volume to 100.00%
Sound - Play 05 <gen>

by the way mp3 is way better since the flac sounded like fart noises.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
This is because I want all of the players to be in tune with whats going on in the music as they all share the same beats.
This is a huge can of worms that you might not be able to deal with. Music is local so there is no guarantee on any client as to the current state of the music. When ordering music to be played the music might not start immediately depending on I/O and if the client has music enabled or not. Music might end pre-maturely due to music being muted by the player. Music playback continues while the game is paused, such as when waiting for network communications or players to catch up. Music playback speed is subject to potential clock drift between client PCs however within the playback duration this is likely well under a mico second. Anything that causes the sound submission of Warcraft III to freeze will also cause the music to freeze for the same period.

For this reason I strongly advise against building gameplay around background game music in Warcraft III. If it really must be done then using sounds and the sound channel might cause better results. Additionally the music playback would need to be regularly re-synchronized and there should be some tolerance mechanics to compensate for lag or when the sound goes out of sync with game time.
 
Status
Not open for further replies.
Top