Could you allow us to use the function playSound3D in our maps?
Is there a reason why it's not allowed?
Printable View
Could you allow us to use the function playSound3D in our maps?
Is there a reason why it's not allowed?
Please provide your code.
The attached object (ajetdoor5131) is there in my script, I didn't include it here obviously.Code:
-- POLICE ELEVATOR MUSIC --
function musicPlayerPolice()
local x,y,z = getElementPosition( ajetdoor5131 )
local elevatorMusicPolice = playSound3D ("sounds/2.mp3", x, y, z, true)
setSoundMaxDistance (elevatorMusicPolice, 35)
setSoundVolume ( elevatorMusicPolice, 0.7 )
attachElements ( elevatorMusicPolice, ajetdoor5131 )
end
addEventHandler("onClientResourceStart", resourceRoot, musicPlayerPolice)
This worked completely fine in the Map Editor, but when I play the map in PTP I don't hear anything. I think I even turned off the radio in settings, and turned on the map music (In case that was the reason).
Cant search for this issue if you get constantly spammed by errors... Fix your scripts bro!
Attachment 64268
My maps don't have the audio currently, I removed them before because it didn't work.
However...I just uploaded an update, so now my map Exposed (not Exposed 2) should have music in the elevator.
@PLASMA Alright, after a couple of updates to my maps, I'm positive that you won't get spammed by errors. If you have time, I'd appreciate if you check it out again. (Exposed 2 doesn't have the music, try Exposed)
Thanks