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

Multiple sound overlapping? only 1 sound playing

Level 5
Joined
Nov 3, 2018
Messages
80
I'm trying to play a 3D Sound when a unit dies but it seems to glitch/bug since only a single instance of the sound is played when that unit dies.
Is there a sound system laying around that works? i tried a some but none worked for me and there are threads directing me to "soundutils" which sends me to the dead w3c page
i've found a jass system here but there's not even an example map so that i could atleast attemp to use a custom script in GUI i know replacing internal sounds and editing the model is an option but i would rather not do it if possible
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
I'm trying to play a 3D Sound when a unit dies but it seems to glitch/bug since only a single instance of the sound is played when that unit dies.
Is there a sound system laying around that works? i tried a some but none worked for me and there are threads directing me to "soundutils" which sends me to the dead w3c page
i've found a jass system here but there's not even an example map so that i could atleast attemp to use a custom script in GUI i know replacing internal sounds and editing the model is an option but i would rather not do it if possible
Try changing the channel in the Sound Editor. 3D sounds shouldn't fight with one another if they're on something like Combat.
 
Level 5
Joined
Nov 3, 2018
Messages
80
Try changing the channel in the Sound Editor. 3D sounds shouldn't fight with one another if they're on something like Combat.
i did try setting them into the combat channel but overlapping issue persists on 3D sounds attached to units unless maybe i am using the wrong format (mp3)
 
Level 5
Joined
Nov 3, 2018
Messages
80
Try .wav, also maybe attached sounds is the issue. Does it need to be attached?
i'm using a trigger both for trained units (they get trained in eggs not in a building)
for training i am using a point (and the same issue happens but its not much of an issue since training happens at different times)

but for death that can usually happen at the same time my first attemps were with points , meaning that the only possible issue may be . mp3
ill change it to wav and give it another try. regular and 3D sounds cannot overlap for some reason
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
i'm using a trigger both for trained units (they get trained in eggs not in a building)
for training i am using a point (and the same issue happens but its not much of an issue since training happens at different times)

but for death that can usually happen at the same time my first attemps were with points , meaning that the only possible issue may be . mp3
ill change it to wav and give it another try. regular and 3D sounds cannot overlap for some reason
Here's a little GUI system I just made. It should give you full control over playing standard/3D sounds and has a feature for playing a sound for a single player.

The only "Jass" you need to use is a single line of custom script:
  • Play Sound
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set VariableSet SM__Sound = Abilities/Spells/Human/Defend/DefendCaster
      • Set VariableSet SM__Sound_Point = (Position of (Triggering unit))
      • Custom script: call SoundManagerPlay()
It provides a few of these SM__ variables which can be Set to modify your Sound prior to playing it. The only required variable is SM__Sound since that contains the actual file path to the sound file. Unset variables will use the default settings like max volume, normal pitch, etc.

Let me know if you find any bugs, I didn't test it beyond what's seen in the demo map. Speaking of demo map, to test it properly you have to select a group of Wisps and press the Escape key to kill them. You'll hear a 3D "Defend" sound play on each of them.

Edit: System code can be found here if you can't open the map:
 

Attachments

  • SoundManager 1.w3m
    21.2 KB · Views: 3
Last edited:
Level 5
Joined
Nov 3, 2018
Messages
80
Here's a little GUI system I just made. It should give you full control over playing standard/3D sounds and has a feature for playing a sound for a single player.

The only "Jass" you need to use is a single line of custom script:
  • Play Sound
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set VariableSet SM__Sound = Abilities/Spells/Human/Defend/DefendCaster
      • Set VariableSet SM__Sound_Point = (Position of (Triggering unit))
      • Custom script: call SoundManagerPlay()
It provides a few of these SM__ variables which can be Set to modify your Sound prior to playing it. The only required variable is SM__Sound since that contains the actual file path to the sound file. Unset variables will use the default settings like max volume, normal pitch, etc.

Let me know if you find any bugs, I didn't test it beyond what's seen in the demo map. Speaking of demo map, to test it properly you have to select a group of Wisps and press the Escape key to kill them. You'll hear a 3D "Defend" sound played on each one.
i was not expecting a whole system , damn uncle thank you so so much! ill give it a try :D
 
Top