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

How to play sound for one player?

Status
Not open for further replies.
  • Sound
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • -------- Custom Script function --------
      • -------- Does the below actions only to the Triggering Player --------
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • -------- Add your usual GUI functions between the custom scripts --------
      • Sound - Play (Last played sound)
      • Custom script: endif
 
Level 12
Joined
Apr 16, 2010
Messages
584
Sorry for the late reply, use
  • Actions
    • Set Player = (Owner of (Triggering unit))
    • Custom script: if GetLocalPlayer () == (udg_Player) then
    • -------- Place your GUI actions here --------
    • Custom script: endif

I have a question what if i use arrays in variable Player, so i can set 2 or more players:
  • Set Player[1] = Player 1 (Red)
  • Set Player[2] = Player 2 (Blue)
  • Set Player[3] = Player 3 (Teal)
So what do i have to change here:
  • Custom script: if GetLocalPlayer () == (udg_Player) then
?
I'm having this problem with dialogs.
 
Status
Not open for further replies.
Top