Play Sound for One Player

Sil3nt

SUP?
Reaction score
134
I've done a lot of searching but I'm quite clueless about custom scripts/jass other than removing the common leak, so I don't exactly know what to do. This is what I've got so far:

Trigger:
  • Back
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Back
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Target unit of ability being cast)) Not equal to (Player number of (Owner of (Triggering unit)))
        • Then - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: (cc_players[0] + (Must target a unit that belongs to you. + cc_endtag))
          • Custom script: call PlaySoundForPlayer(player, sound)
        • Else - Actions
          • Set temp_loc[1] = (Center of sentWORLDtree <gen>)
          • Unit - Order (Target unit of ability being cast) to Attack-Move To temp_loc[1]
          • Custom script: call RemoveLocation(udg_temp_loc[1])


What would I need to do with the first custom script for it to play the Sound/Interface/Error.wav sound for the owner of the triggering unit?

Thanks
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
GetLocalPlayer() might help in this case. Search the forum a bit, there's tutorials here somewhere.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top