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

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