Thread: SoundUtils
View Single Post
Old 01-28-2014, 01:21 PM   #85
MasterofSickness
User
 
MasterofSickness's Avatar
 
Join Date: Feb 2006
Posts: 218

MasterofSickness is on a distinguished road (23)

Idea

So if i want to play a sound for several, but no all players (for a team of players), do I have to create several integers & defining the same sound for every integer?

EDIT:
Defining the same sound in different integers wont work! In the following example only Player(1) will hear a sound:
Collapse JASS:
local integer i_SoundType = DefineSound("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav", 3326, false, false) // requires library "SoundUtils"
local integer i_SoundType2 = DefineSound("Sound\\Ambient\\DoodadEffects\\SargerasLaugh.wav", 3326, false, false) // requires library "SoundUtils"
call RunSoundForPlayer(   i_SoundType, Player(1)   ) // requires library "SoundUtils"
call RunSoundForPlayer(   i_SoundType2, Player(0)   ) // requires library "SoundUtils"

EDIT2:
Ah, read a bit through the library...
i will use a "RunSound" for local player like risingdusk did for playing the sound for 1 player (at the end of his library "SoundUtils")!
__________________
my nicknames:
20002006200720102012
Master of SicknessDesignatusKakarotEdwardElricSourceSeeker
MasterofSickness is offline   Reply With Quote