• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Play SOUND for a PLAYER

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Actions
    • Set Player_Var = some player
    • Custom script: if GetLocalPlayer() == udg_Player_Var then
    • Sound - Play some sound
    • Custom script: endif
If you are interested, what GetLocalPlayer does is get the player that the code is actually working for, since warcraft isn't multi threaded and so it works it's code player by player every frame.
 
Last edited:
Level 20
Joined
Oct 21, 2006
Messages
3,230
Do I remove that "sound leak", just like in a normal play sound trigger?

  • Set player = (Player group(Player 1 (Red)))
  • Custom script: if GetLocalPlayer() == udg_player then
  • Sound - Play BanditWarcry1 <gen>
  • Custom script: endif
I hear nothing.
 
Last edited:
Status
Not open for further replies.
Top