Prompt sound from unit?

Status
Not open for further replies.
Well yes.

The sounds from each unit's sound set are all individually available in the sound editor. If you want to randomise it, put all the sounds in an array and specify a random index:

Set FootmanAttackSound[1] = Footman Attack 1
Set FootmanAttackSound[2] = Footman Attack 2
etc

Then play it with Sound - Play FootmanAttackSound[random number between 1 and 2]
 
Level 7
Joined
May 11, 2010
Messages
278
Thing is I'd like to make a trigger that selects a random unit from a group and plays one of that units "what" (selection) quotes. And I mean I can do that, but if I have to select the "what" quote of every possible unit in the sound editor and then write a trigger checking the unit type and selecting the right sound to play, it's just too much work for a fairly minor thing and simply not worth it.
 
Level 26
Joined
Aug 18, 2009
Messages
4,099
You can read the UI\SoundInfo\UnitAckSounds.slk programmatically and convert it to your jass lines, mapping the paths to the unit type id and maybe the string identifier.

edit: You also need the Units\unitUI.slk to know which soundset is attached to the unit.

and ofc the war3map.w3u for custom changes.
 
Last edited:
Status
Not open for further replies.
Top