• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] is there a function for this?

Status
Not open for further replies.
Level 8
Joined
Aug 4, 2006
Messages
357
quick question: is it possible to use a JASS function (or combination of functions) to play a sound for a specific player?

All the functions I can find play a sound for all players... I'm basically trying to mimic the way units say stuff when given orders, using triggers.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Hmm i tried it like this way:

JASS:
function Trig_Play_Sound_Actions takes nothing returns nothing
    call PlaySoundForPlayer( Player(0), gg_snd_YourSound )
endfunction

//===========================================================================
function InitTrig_Play_Sound takes nothing returns nothing
    set gg_trg_Play_Sound = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Play_Sound, function Trig_Play_Sound_Actions )
endfunction

(The used sound is YourSound) (Trigger is for player 1 only)

MfG
Dr. Boom
 
Status
Not open for further replies.
Top