Dretax Posted April 8, 2017 Share Posted April 8, 2017 (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 April 8, 2017 by Dretax Link to comment
Pembo Posted April 8, 2017 Share Posted April 8, 2017 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. 1 Link to comment
Dretax Posted April 8, 2017 Author Share Posted April 8, 2017 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? Link to comment
Bananovy Posted April 8, 2017 Share Posted April 8, 2017 (edited) setSoundMaxDistance(sound, 75) isn't this decreasing the volume as you want? Edited April 8, 2017 by Bananovy Link to comment
Pembo Posted April 8, 2017 Share Posted April 8, 2017 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
Dretax Posted April 8, 2017 Author Share Posted April 8, 2017 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
Tails Posted April 8, 2017 Share Posted April 8, 2017 You have to set its interior. For example: setElementInterior(sound, 1) Link to comment
Dretax Posted April 8, 2017 Author Share Posted April 8, 2017 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 ^ Link to comment
AlvarO Posted April 8, 2017 Share Posted April 8, 2017 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... Link to comment
Dretax Posted April 8, 2017 Author Share Posted April 8, 2017 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
AlvarO Posted April 8, 2017 Share Posted April 8, 2017 Okay, post again if you have any question. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now