Warcraft III resources & community, 2003–2006 · archived

How to play a sound only for one player?

2 posts
#1

How to play a sound only for one player?

i cant recognize how to do that :(
there is only "play sound" but in a multiplayer map i think it will be heard by all players

thx in advance for replys :)
#2
function PlaySoundForPlayer takes player whichPlayer, sound whichSound returns nothing
if ( whichPlayer == GetLocalPlayer() ) then
call PlaySoundBJ( whichSound )
endif
endfunction

or just:
Custom script: call PlaySoundForPlayer( gg_snd_YourSound, udg_snd_YourPlayer )