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