• 🏆 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!

Play sound to owner of unit player?

Status
Not open for further replies.
Level 7
Joined
Jul 1, 2008
Messages
1,025
Hi, is it posible to play sounds to specific owner of specific unit players?

For example: Play sound to player: Owner of (ExampleUnit).

Something like that.


I usually play sounds to players using the "if GetLocalPlayer() == Player(3) then" custom script but this obviously dosnt detect which player owns this specific unit.


I could do it with conditions to detect which player owns this unit but I use lots of sounds and it will be a hell of a task to make this all for 12 players.

EDIT: SOLVED! All I had to do was set a variable to owning player then play the sound using a custom script like before.
 
Last edited:
Status
Not open for further replies.
Top