Jump to content

Seems like sound doesn't play in interiors


Dretax

Recommended Posts

Posted (edited)
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.

Edited by Dretax
Posted
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
Posted
8 hours ago, Pembo said:

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.

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

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

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

Posted
2 hours ago, Tails said:

You have to set its interior. For example:

setElementInterior(sound, 1)

We are discussing a different matter at the moment. See up there ^

Posted

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

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

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