• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

A way to play sound simultaneously?

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
I make a trigger that when a specific unit type attacks, a sound is played. The sound is 0.4 seconds.

If you say put 10 units of that type to attack something, you won't hear the sounds at the same time for each time overlapping while they attack. The trigger just plays the sound like it finishes it and it starts it again which doesn't synchronize with the missiles that fly. And I want them to be overlapping, played at the same time. Kind of like when place Riflemen and they shoot, you can hear the sounds at the same time.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I'm not sure about overlapping the sounds, but use SoundUtils. It makes a whole lot of things easier to do with sounds, such as playing them while they are already being played.

I think that if you use many different sound handles it plays them separately, while playing the same sound over and over will always wait for the sound to finish.

Personally I don't like using a lot of Dusk's work, as it's buggy, but I have not had any problems with SoundUtils in any basic implementation.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
If you're not going to use anything but Custom Script then it's going to be pretty impossible for you to do this. Obviously it is still possible, but the complexity that it would yield in GUI would make it harder to use than the JASS equivalent.
 
Level 11
Joined
Feb 11, 2010
Messages
199
I make a trigger that when a specific unit type attacks, a sound is played. The sound is 0.4 seconds.

If you say put 10 units of that type to attack something, you won't hear the sounds at the same time for each time overlapping while they attack. The trigger just plays the sound like it finishes it and it starts it again which doesn't synchronize with the missiles that fly. And I want them to be overlapping, played at the same time. Kind of like when place Riflemen and they shoot, you can hear the sounds at the same time.

As much as I hate to contradict Berb, you can totally do this in GUI (so long as it's not an imported sound path) with a simple workaround. Just attach the sound to an ability in the object editor, then use that ability whenever you want the sound to play. That's what I usually do, anyways.

Yet another potential workaround is to actually go and edit the model, and change the sound attached to its attack animation. You can do this fairly easily with Magos Model Editor, a free program available on this site. I think this method will work with custom sounds as well, though I have not personally tested that.

So there you have it, two solutions to your problem that do not require a single line of custom script or JASS! :thumbs_up:
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
You guys and your GUI workarounds.

No, it's imported sound, so it wouldnt work with GUI. It was for Attack, not Ability. For Ability you use cooldown, etc triggers can play it once for that time :)

What makes it sound every time if released is either to set the unit to use some Weapon Sound which as you know e.g Metal Chop has sounds for Metal Chop Flesh, Metal Chop Stone, Metal Chop Metal and these sounds have Metal Chop Stone 1 Metal Chop Stone 2 ,etc wow, and replacing many sounds just for that is not worth it.

Or adding the sound to the missile itself, yes but it is a custom sound, while again what you do in Magos as a sound set consists of several sounds in game so again not worth it.

If it were made possible to attach a custom sound to a model in Magos - I dont know why it was never made possible, that would be the thing :) Thanks though, I will leave it without playing it at the same time.
 
Status
Not open for further replies.
Top