Jump to content

Seems like sound doesn't play in interiors


Dretax

Recommended Posts

2 minutes ago, Dretax said:

local sound = playSound3D("sounds/9mmshot.mp3", x,y,z)
setSoundMaxDistance(sound, 75)

Any idea why isn't It playing in interiors? Tried enable interiorsounds, but doesn't work as well.

If the sound is created inside an interior which is in another dimension then you must use setElementDimension() on the sound directly after for it to work.

  • Like 1
Link to comment
1 hour ago, Dretax said:

One more thing. Is there a default method that would automatically decrease the volume, based on the distance?

If its a 3D sound then it creates it within the MTA world meaning it will already by default lose volume as a player reaches a certain distance from it.

Link to comment
6 minutes ago, Pembo said:

If its a 3D sound then it creates it within the MTA world meaning it will already by default lose volume as a player reaches a certain distance from it.

Weirdo. Some guys say It feels like the same.

Link to comment
1 minute ago, AlvarO said:

Try to decrease it while player is moving, so you have to use getElementPosition() and make a relation from the sound and the player and for x distance decrease it, its weird that it doesnt decrease by itself...

I was thinking about that, will give It a go.

Link to comment

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...