as i did some research i dont think it was a video i used, im pretty sure it was this tutorial.sounds like youll want to add the sound to the model with like War3 Model Editor
some units like peasants and such have their sounds in the model instead of an option in the unit editor. there are a few tutorials on youtube and stuff which make it pretty easy to figure out. ive used it to add the repair sound to a custom worker model and it works with playing the sound when theres multiple units doing that action.
EDIT - ill see if i can find the youtube video i used to help me with the worker
I have a trigger that it attaches 3D sound to unit that loops itself as default sound for the unit as it stands moves or whatever it does, but whenever it attaches the same sound on another unit the previous sound stops.
//***************************************************************************
//*
//* Sounds
//*
//***************************************************************************
function InitSounds takes nothing returns nothing
set gg_snd_EnchantedCellLoop=CreateSound("Sound\\Ambient\\DoodadEffects\\EnchantedCellLoop.wav", false, true, true, 10, 10, "DefaultEAXON")
call SetSoundParamsFromLabel(gg_snd_EnchantedCellLoop, "EnchantedCellLoop")
call SetSoundDuration(gg_snd_EnchantedCellLoop, 4999)
endfunction
CreateSound()
function in order to create a new sound instance. I don't think there is one in GUI.function AttachSoundUnit takes unit u, string s, integer volume, integer channel, integer duration, boolean doesLoop,boolean stopoutofrange, integer FadeIn, integer FadeOut returns nothing
set udg_lastCreatedSound = CreateSound (s, doesLoop, true, stopoutofrange, FadeIn, FadeOut, "DefaultEAXON")
call SetSoundDuration(udg_lastCreatedSound, duration)
call SetSoundChannel(udg_lastCreatedSound, channel)
call SetSoundVolume(udg_lastCreatedSound, volume)
call SetSoundPitch(udg_lastCreatedSound, 1.0)
call SetSoundDistances(udg_lastCreatedSound, FadeIn, FadeOut)
call SetSoundDistanceCutoff(udg_lastCreatedSound, FadeOut * .75)
call SetSoundConeAngles(udg_lastCreatedSound, 0.0, 0.0, volume)
call SetSoundConeOrientation(udg_lastCreatedSound, 0.0 , 0.0 , 0.0)
call AttachSoundToUnit(udg_lastCreatedSound, u)
call StartSound(udg_lastCreatedSound)
endfunction
call AttachSoundUnit(GetTriggerUnit(), "PathToYourSound\\helirotor2.wav", 127, 9, 2000, true, false, 0, 3000)
function AttachSoundUnit takes unit u, string s, integer volume, integer channel, integer duration, boolean doesLoop,boolean stopoutofrange, integer FadeIn, integer FadeOut returns nothing
btw how do i refer to that sound your variable is not array, i guess ill make it, tell me if im wrong