ZupaleX Posted August 2, 2015 Share Posted August 2, 2015 (edited) NOTE : ANSWERE TO THE ISSUE AT POST #5 IF SOMEBODY IS INTERESTED Hello, so I searched a bit and found just one post from february with no answere about this issue, so I try my own luck Basically, when playnig a sound (in my case, in a stategraph), the sounds behave properly for clients, but the host is spammed by the sounds emmitted by all the clients, even if they are like at the other border of the map. I "fixed" it so at least the poor host is not spammed anymore by adding this : if TheNet:GetIsDedicated() or(TheNet:GetIsServer() and ThePlayer ~= nil and ThePlayer:IsNear(inst, 30)) thenprint("inst is : ", inst, " / ThePlayer is : ", ThePlayer)inst.SoundEmitter:PlaySound("bow_shoot/bow_shoot/bow_draw", nil, nil, true)end This way, if it's a dedicated, nothing changes and everuthing is fine. If the host is also a player, it will prevent him from recieving the sound from everyone not nearby.The issue is that of course, then it disable the ability of the clients to hear other players if the host is not here as well. Any "proper" fix? Edited August 5, 2015 by ZupaleX Link to comment Share on other sites More sharing options...
DarkXero Posted August 3, 2015 Share Posted August 3, 2015 @ZupaleX, Try usinginst.SoundEmitter:PlaySound("bow_shoot/bow_shoot/bow_draw")(removing the nil and true). Also, replace the "autopredict" tags from your states, to "pausepredict". Link to comment Share on other sites More sharing options...
ZupaleX Posted August 3, 2015 Author Share Posted August 3, 2015 Hello, I added it at the first place the additional arguments because of this issue. Just a blind try, I know it shouldn't have any influence anyway since the second argument is to give a name to the event and the 3rd is the volume. The 4th one has something to do with the prediction but I have to admit it is not totally clear to me (tried to put it to true and false to test, no changes) I will try the tag thingy, thanks! Link to comment Share on other sites More sharing options...
ZupaleX Posted August 5, 2015 Author Share Posted August 5, 2015 So it doesn't work.Funny fact : If I put a standard Don't starve sound (like the sound used for spear attack) it doesn't create any issue.Am I missing something in the way I include my assets or is there something specific to know about FMOD ? My assets : Assets = { Asset( "ANIM", "anim/bow_attack.zip" ),Asset("SOUNDPACKAGE", "sound/bow_shoot.fev"), Asset("SOUND", "sound/bow_shoot_bank00.fsb"), Asset("ATLAS", "images/tabimages/archery_tab.xml"), Asset("IMAGE", "images/tabimages/archery_tab.tex"), Asset("ATLAS", "images/tabimages/quiver_slot.xml"), Asset("IMAGE", "images/tabimages/quiver_slot.tex"),} Link to comment Share on other sites More sharing options...
ZupaleX Posted August 5, 2015 Author Share Posted August 5, 2015 (edited) So I figured it out eventually after realizing that the issue was not occuring with default sounds. It meant that it was not coming from my code.So in your FMOD project, you will find for each sound on the right pannel an option called "mode" which is by default "2D".You have to switch this option to "3D" and then set you max distance at which the sound can be heard.And... voilà There should be a proper tutorial for FMOD, because thispiece of information is not even mentionned while it is CAPITAL. EDIT : After some testing, decent base parameters to start toying with seems to be: Mode : 3D3D Rolloff : Linear3D Min Distance : 13D Max Distance : 35 everything else left to default values Edited August 5, 2015 by ZupaleX Link to comment Share on other sites More sharing options...
DarkXero Posted August 5, 2015 Share Posted August 5, 2015 @ZupaleX, you are correct.It happened the same before:http://forums.kleientertainment.com/topic/53706-my-mod-characters-voice-is-playing-to-the-whole-world/ My mistake for not noticing. Glad you figured it out. Link to comment Share on other sites More sharing options...
ZupaleX Posted August 5, 2015 Author Share Posted August 5, 2015 Oh I missed this thread. I guess I did not type the proper keywords!Thanks anyway Link to comment Share on other sites More sharing options...
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