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 On 08/04/2017 at 00:33, 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. Expand 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 On 08/04/2017 at 00:37, 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. Expand 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 On 08/04/2017 at 08:54, Dretax said: One more thing. Is there a default method that would automatically decrease the volume, based on the distance? Expand 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 On 08/04/2017 at 10:05, 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. Expand 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 On 08/04/2017 at 10:36, Tails said: You have to set its interior. For example: setElementInterior(sound, 1) Expand 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 On 08/04/2017 at 12:51, 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... Expand 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