HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

sound on attack

11-28-2006, 08:34 AM#1
scythetleppo
I am trying to make my unit use a wave file for an attack. I have this:


Code:
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to myunit
    Actions
        Sound - Play mysoundvariable at 100.00% volume, attached to (Attacking unit)

and it sort of works with only one unit except if i use multiple of the unit, instead of having like independant sounds going at all different times, it sort of just loops the sound over and over, not actually playing the sound with the actual attack.

can someone tell me what to do to make it the actual attack sound even for lots of units seperately?
11-28-2006, 09:53 AM#2
Anitarf
As you found out, a single sound can't be played in multiple instances at the same time. You would need to dynamicaly create sound objects on each attack for that.
11-28-2006, 10:27 AM#3
scythetleppo
ok and how do i do that?
11-28-2006, 12:36 PM#4
ArchWorm
Collapse JASS:
native CreateSound takes string fileName, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate, string eaxSetting returns sound
Do you know JASS?
11-29-2006, 03:09 AM#5
scythetleppo
any way to do it in gui? i dont know jass