• 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.

Is it possible to play sounds for specific player?

Status
Not open for further replies.
Level 7
Joined
Jul 1, 2008
Messages
1,025
Hey, is it possible to play sounds for just one player only? I have sounds to play when a player selects a unit (not owned by them) but don't want other players nearby to hear it otherwise they'll be loads of sounds going off at once.

I've been trying to work it out in the triggers but there dosnt seem to be an option for specific player sounds.
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
Yes it is fully possiable.

Simply use GetLocalPlayer() (with JASS) to desync the sound so it only runs on the one player's PC and not on the other.

if GetLocalPlayer() == YourPlayerHere then
//Play your sound (do not make any objects as it may cause a desync)
endif

Sorry for the newb questions again but How do I get Jass I've only heard that its complicated but powerfull, do I need to download it from somewhere? I also heard it dosnt work with the new WC3 patch?

I'm not sure what you mean by not making any objects? Do you mean don't attach the sound to anything?

There is a action called 'sound - play sound on unit', try that one :)

I thought that only worked in the same way the sound attached to unit worked? If it plays for the owning player of unit then thats still helpfull in other areas of my map but the selected unit isnt owned by the player in this instance.
 
Status
Not open for further replies.
Top