Player Specific Clientside Sounds

I’m looking into an underwater effect again, and I don’t want to place 3d sounds everywhere in the water just to create this effect.

Is there a way that I can get a 2d sound to play on a specific character, while using a level asset as a trigger?

I’m trying to make it when they enter the water, the 2d sound plays only on the character (who is in the water)'s machine.

Thanks!

In your level blueprint, where your trigger events are: try using the ‘Play Sound Attached’ node and attach it to your specified player. Let me know how it goes :slight_smile:

NOTE: like the node description says, this is a ‘fire and forget’ sort of thing so it will only happen once on that player (you can set the specified player to whoever triggered the trigger as far as i’m aware [and no one else should hear it]) and it won’t happen again until the trigger is triggered once more.

Hope I helped!

That would work… But how would I make it only attach to the players within the water area?

Is this a multiplayer game? If so I haven’t really got much knowledge about catering to client - server communication…
I would think that environment sounds (sounds triggered in the map) would be client-side and would affect the player that triggered the volume specifically (but don’t me on this). I’m assuming stuff like this would just be local and it wouldn’t matter the player that used the trigger (if the trigger could put whichever player triggered it in a variable, so then you would attach the sound to the data inside that variable). I hope I’m making sense! Someone more experienced might want to step in here

Yeah its multiplayer. If it were single player I would have no problems with this… Thanks for trying to help though :slight_smile:

Any body else wanna take a go?

Hi TSpartanT,

What I would do is set up the sound function in the player pawn class. Then what you do is set up a trigger box (placed at any entry to water). When the overlap occurs, cast from the trigger to the specific pawn that overlapped it and from there play the function.

I’ll try this in a bit, but that should work great… Thanks!