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

Can I make the same units have different deaths sounds based on whether or not

Status
Not open for further replies.
Level 14
Joined
Dec 12, 2009
Messages
1,027
u would have to trigger the sounds to do this

detect when a unit dies. then use an ITE to see who owns it then play the music of the one or the other. it would be better to set in the OE that the unit plays no sound. That way the sounds wont overlap as much

Aren't some sounds model dependent though? Example: A unit on my map plays the Troll Batrider's death sound when it dies (a custom unit), even though it has the owl sound set assigned to it. I don't see this with every model, but it's pretty common with custom models I've DL from here...

//\\o0//\\
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Aren't some sounds model dependent though? Example: A unit on my map plays the Troll Batrider's death sound when it dies (a custom unit), even though it has the owl sound set assigned to it. I don't see this with every model, but it's pretty common with custom models I've DL from here...

//\\o0//\\

ive never downloaded custom models so im not sure. I guess it is possible.

to counter that try the stop sound then play the one u want. Maybe that will work
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Well seems impossible, hundreds of units die a second sometimes... It's for a risk map with a lot of units

its not impossible and u can play sound at spot. So if a players camera is on that spot they will hear the sound. You wont be able to do stop sound as i believe it stops all sounds. (havent checked on that)

i would just play sound at location of the dying unit (use triggering unit in the trigger) and remove the sounds in the OE.

triggers never fire at the same time i have multiple counters for my map and when unit dies even when killing a few 100 in less than a second everything works fine.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
So I'm guessing I have to trigger this and override all the sound files with empty files? Lol.

Well, you cant actually remove the death sound for the warcraft 3. So, the only option is playing a sound through triggers. Here is how if you want to make the sound random on what to play:

Firstly, make a trigger of course. After that make an variable for example named, DeathSound. Be sure to make it have arrays. Now import your death sounds on the World Editor and use them as sounds so they can be used on the triggers also. Next is set this sounds on a variable for example this:

  • Set DeathSound[1] = ImpaleHit <gen>
Make this for each death sounds you have so for another sound it will be like this:

  • Set DeathSound[2] = >>Your next sound here<<
Now, if you have all set them on a variable. Now make another trigger like this:

  • Example
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set DeathSound[1] = ImpaleHit <gen>
      • Set DeathSound[2] = BristlebackDeath1 <gen>
      • Sound - Play DeathSound[(Random integer number between 1 and 2)]
Just to make sure, I have set again the sounds into the variables. Now you will play the sound, ranadom integer between 1 and 2. And so it will rather play Death Sound[1] or [2].

The only disadvantage here is the original death sound of the unit will still be played, well the solution here is set the volume higher to the orginal death sound so it will not be heard and your custom death sound will be heard. ANd also, all players will sadly hear this.
 
Status
Not open for further replies.
Top