HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Playing a sound for just one player - possible?

12-26-2003, 04:58 AM#1
ph33rb0
I was wondering if playing a sound for just one player is possible, and if so, how?

I haven't found a way with the sound triggers thus far.
12-26-2003, 05:32 AM#2
th15
I would like to know if this is possible too.

Also, i can't seem to get 3d sounds to work for some reason :(
12-26-2003, 03:45 PM#3
ph33rb0
Yea, that's funny 'cause my 3D sounds haven't been working either. Hrm...
12-26-2003, 04:18 PM#4
DaKaN
using play sound combined with GetLocalPlayer() will work. I do it all the time.

If (GetLocalPlayer() == ConvertedPlayer(1)) then
call PlaySound(sound)
endif

will play a sound for player1 ONLY
12-26-2003, 06:56 PM#5
Vexorian
Yep, Dakan is right and To play a 3d sound you need to give it at position (Play sound at position) You can convert a 3d sound into a non 3d in the sound editor
12-26-2003, 07:48 PM#6
ph33rb0
Every time I enable my trigger with that if statement my world editor crashes.
12-26-2003, 07:58 PM#7
Vexorian
You need to change the sound with a sound variable (If you called it Rock with the sound editor , the sound variable will be gg_snd_Rock )
12-26-2003, 08:00 PM#8
DaKaN
yea, also look up the exact syntax for the call PlaySound(SoundVariable)

i was going by memory, so im not sure if its 100% accurate....
12-26-2003, 08:02 PM#9
Vexorian
Yea, it is PlaySoundBJ instead of PlaySound
12-26-2003, 08:12 PM#10
Vexorian
Put that function on the trigger Root (The part where the map's title shows in the trigger editor, You won't need to place the function anywhere else
12-26-2003, 08:22 PM#11
ph33rb0
Yeah thanks a lot guys that really helped.

I can do a lot with GUI but JASS I've been kind of lacking in so I'm glad I can get at least some of it down.
12-26-2003, 08:49 PM#12
DaKaN
np, its what we are here for :)
02-16-2004, 06:57 AM#13
dexllgamer
Hi want to do this same thing, play sounds for only certain people. But waht you guys just said there seems like greek to me. Is there anyway you might be able to rephrase that so that us noobies can understand?

Can you make a small map to show me how to do it?

If anyone know of a better way to do this i would love to hear it.

Thanks ahead of time.
02-16-2004, 08:44 AM#14
Earth-Fury
convert the trigger to jass. add those lines of code to it where u want it to appear in the trigger.
02-16-2004, 05:33 PM#15
dexllgamer
Is jass codeing the only way to skin this cat? If so, im doomed. Im not good at jass. Can you or someone 'show' me how to do this?

Could you paste a trigger here or can you make a map with trigger in it and attach it?

I would be most greatfull.

Thanks again ahead of time.

Does anyone today know how to do this and can show me?