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

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
671
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