HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Play a sound for triggering player?

10-08-2005, 08:22 AM#1
The_AwaKening
I have a trigger to ping a unit, and display a message to triggering player basically. My problem is that I can't find an action to play a sound to triggering player. So I basically want to know if there is a way to do this or even if there is another action I am missing that will ping the minimap with sound as well.
10-08-2005, 07:38 PM#2
Vexorian
Code:
custom script: if (GetLocalPlayer()==GetTriggerPlayer()) then
(call play sound sound thing)
custom script: endif


Custom script stuff is always case sensitive
10-08-2005, 11:31 PM#3
The_AwaKening
Awesome thanks VEX. I figured it would have to be something custom.
10-09-2005, 05:13 PM#4
MrApples
How would you do this for owner of casting unit?
10-10-2005, 04:51 PM#5
Thunder_Eye
Code:
Set tempPlayer = (owner of (casting unit)
Custom script:   if GetLocalPlayer() == udg_tempPlayer then
(call play sound sound thing)
Custom script:   endif
10-10-2005, 10:03 PM#6
MrApples
It expects a name and "endif" and wont let me save.
10-11-2005, 08:34 AM#7
Anitarf
Quote:
Originally Posted by MrApples
It expects a name and "endif" and wont let me save.
Then you did something wrong, and we have no way of knowing what unless you post your trigger. Be reminded that JASS is case sensitive.
10-13-2005, 08:28 PM#8
Gandalf2349
My Best guess is that you added a space between end and if.

end if - BAD
endif - Good

the name is probably you messed up on GetLocalPlayer(), possibly didn't add parenthesees, or you messed up on udg_tempPlayer, forgot the udg_ or mis-capitaled(sp?).
10-13-2005, 08:46 PM#9
MrApples
[code]
Actions
Set TempPlayer = (Owner of (Casting unit))
Custom script: if GetLocalPlayer() == udg_tempPlayer then (call PlaySoundBJ( gg_snd_Error ))
Custom script: endif

10-13-2005, 08:50 PM#10
Vexorian
you must use a next line after then (don't ask me, ask blizzard)
10-14-2005, 07:10 PM#11
Gandalf2349
Code:
Actions
    Set TempPlayer = (Owner of (Casting unit)) 
    Custom script:   if GetLocalPlayer() == udg_tempPlayer then 
    Custom script:   call PlaySoundBJ( gg_snd_Error )
    Custom script:   endif

They're just using block if/then/elses, they just chose not to add the one-liners. Saves processing time (ever so slightly) when they compile it at loading screen or in-game, whenever they do it.