• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to play sound that will not stop?

Status
Not open for further replies.
Hi, i have an simple question.
How to play any sound using triggers, that will not stop when you play another sound?
For example, if unit attack to unit, trigger turn on sound of axe attack...
If 10 units will attack together, all sounds of all unit will play and none of the played sound will stop until it finish the sound lenght.

Is there some way? Thanks :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
A unit is Attacked - Play Axe-Attack sound.

Or just modify the "Sound - Attack" field in the Object Editor on the unit.
 
Level 13
Joined
Sep 29, 2008
Messages
672
I don't think you could do that with triggers. Maybe make multiple sound variables or make a no target (instant cast) ability and set "Sound - Effect Sound" to the sound u want to use then make a dummy to cast that spell, something like that I guess.

I think there's no other way to do this in GUI triggers.
Maybe some people might now, but those are the only suggestions I can give you.
 
For every sound, create an integer variable and do this to create a sound:

  • Custom script: set udg_YOUR_INTEGER = NewSound("insert filepath here", Duration in milliseconds over here, is It Looping? (true or false), is it 3D? (true or false))
An example for a sound with filepath "war3importedsound1", duration of 4 seconds, not looping and not 3D:

  • Custom script: set udg_Integer = NewSound("war3importedsound1", 4000, false, false)
To play the sound:

  • Custom script: call RunSound(udg_Integer)
If you want to play the sound on a unit:

  • Custom script: call RunSoundOnUnit(udg_Integer, UNIT)
At a point:

  • Custom script: call RunSoundAtPoint(udg_Integer, X, Y, Z)
For a player:

  • Custom script: call RunSoundForPlayer(udg_Integer, PLAYER)
 
Status
Not open for further replies.
Top