HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Sound for players

06-27-2005, 02:35 PM#1
Therin
Is there any way of playing a sound only for certain players? I've been looking at the triggers and I can't seem to find a way...

Also, do players have to have some 3D sound option ON in order to hear 3D sounds at all?
06-27-2005, 03:48 PM#2
iNfraNe
Quote:
Originally Posted by Therin
Is there any way of playing a sound only for certain players? I've been looking at the triggers and I can't seem to find a way...

Also, do players have to have some 3D sound option ON in order to hear 3D sounds at all?
I dont really understand when 3d sounds work and dont work myself, but normal sounds are my friend.

I made this function: it allows you to play different sounds at the same time, and for 1 player:

Code:
function PlaySoundPlayer takes string path player p returns nothing
  local sound snd = null
  set snd = CreateSound(path, false, false, false, 10, 10, "")
  if GetLocalPlayer() == p then
    call SetSoundVolume(snd, 127)
  else
    call SetSoundVolume(snd, 0)
  endif
  call StartSound(snd)
  call KillSoundWhenDone(snd)
  set warning = null
endfunction

just call it with a custom script:

call PlaySoundPlayer("path with \ replaced by \\", udg_tempPlayer)

hope u understand.
06-27-2005, 09:04 PM#3
Therin
Thanks!

Although I did download WEU today and found there was an advanced trigger that allowed you to play sound for certain players ;)
06-27-2005, 10:04 PM#4
Guest
Just to maybe help anyone in the future if you want to play a 3d sound across a map the way to do it is go to the Sound Editor, select the sound you want to use, right click it, select use as sound, double click the sound you want in the sound variables section then uncheck the box marked 3D sound and there you go. The sound can now be played across the entire map when you use the trigger "Play Sound".