playing a sound for a local player

LoveTD's

New Member
Reaction score
34
is it possible?

does this work?

if GetLocalPlayer()==Player(0) then
sound - play sound
endif

which means player 1 will hear a sound?

I'm not sure if this works or not, but if it doesn't is there any other way that you can make a local player hear a sound?
 

Azlier

Old World Ghost
Reaction score
461
It'll work fine, but just don't do anything funky like Destroy Last Created Sound right after, because that would cause a desync.
 

LoveTD's

New Member
Reaction score
34
hmm, ok thnx... but 1 thing
does this also work?

set Player_number_of_owner_of_k_u = player number of owner of killing unit
if GetLocalPlayer()==Player(udg_Player_number_of_owner_of_k_u) then
sound - play sound
endif


because I tryed to do that and when I tested it, it didn't play any sound :S
 

WilliamPa

Active Member
Reaction score
51
Player number of killing unit - 1

I'd recommend to create a sound for everyone but set the sound volume to 100% in the if block
 
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