Sorry, we don't support your browser.  Install a modern browser

Simple sound play, but only to selected player(s)#603

Rather than employing as asset bundle, it would be nice to be able to play a sound from a script. Even better, if that sound could only be heard by selected player(s).

My use case is a game that has “!color message” whispers that sends the message privately but announced to the table the whisper happened. A player asked if it could make some kind of “beep” when a message arrives.

(I’m currently looking at doing this with an asset bundle, but haven’t yet checked if asset bundle visibility also effects who hears a sound.)

5 years ago

I’m looking for a similar feature…

I’m currently building a unique UI and would like to use custom button click sounds that are only heard by the person pressing the button. Either using the assetbundle or the Music Player means everyone can hear the sounds when they are played.

My suggestion is this,

1) Continue using the assetbundle method, but include a new option so its only heard by the color provided.

playTriggerEffect((index=0, name=”Effect Name 1”, color=”PlayerColor”)

2) Update the UI asset menu to enable importing small sound files.

self.UI.playSound(“soundName”, “PlayerColor”)

As a side note, a separate option to turn off or disable the default button click noise would also be extremely helpful so it doesn’t play at the same time as the custom sound.

5 years ago
1

This can be very helpful to get a player’s attention at turn start, for example. When everyone hears the turn start sound, the active player doesn’t get an aural cue that it is THEIR turn…

5 years ago