• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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