• 🏆 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 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,231
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