Jump to content

Play Sound within a distance


Enigma666

Recommended Posts

Posted

Hello,

So, i have, for example, a car lock opening sound. Now i want that sound to play for every player in a certain distance, when a certain event is triggered. I want it to work like how playSound3D does, so if i go further from that place, the sound volume is a bit lower.

How can i do that?

Thanks.

Posted

What's wrong with just using playSound3D?

You could get the players distance from the sound and set the sound volume lower the further they are away, but why go to the trouble when playSound3D does it all for you? :P

Posted

Yes, but so is playSound and all the other audio functions. The idea is you trigger the event from the server to ALL clients, then every client hears the same sound (if they are within distance).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...