Yakuzashi Posted September 5, 2018 Share Posted September 5, 2018 Hi. I wonder why my custom sound doesn't work at all. If someone is willing to help I would be grateful. I don't know where I have made mistake, despite fact that I tried everything that I knew. I just want my weapon to work. help.zip Link to comment Share on other sites More sharing options...
IronHunter Posted September 6, 2018 Share Posted September 6, 2018 I am just going to take a guess, but I am guessing your fsb path structure is either not made properly or you are not calling the correct path. The path is project/eventgroup/event you'll see the path at the top when you click on one of your simple events in fmod. This path is also what you want to call in game. Link to comment Share on other sites More sharing options...
Yakuzashi Posted September 6, 2018 Author Share Posted September 6, 2018 (edited) I have made it like you said. The path is "mosin/gunshot/mosinfire" and I placed it in modmain.lua and weapon.lua in Assets as: Asset( "SOUND", "mosin/gunshot/mosinfire" ) and it crashed. When I have tried with: Asset( "SOUND", "mosin/gunshot/mosinfire.fsb" ), and Asset( "SOUND", "mosin/gunshot/mosinfire.fev" ) it had crashed too. It can't hear sound in game or it just crashes. I attach mosin.fdp just in case. mosin.fdp Edited September 6, 2018 by Yakuzashi update Link to comment Share on other sites More sharing options...
IronHunter Posted September 6, 2018 Share Posted September 6, 2018 The path I meant is for the Soundemitter not the Asset Asset("SOUNDPACKAGE", "sound/mosin.fev"), Asset("SOUND", "sound/mosin.fsb"), inst.SoundEmitter:PlaySound("mosin/gunshot/mosinfire") Assets should be where assets are defined either in the prefab files or modmain. Link to comment Share on other sites More sharing options...
Yakuzashi Posted September 6, 2018 Author Share Posted September 6, 2018 I can't hear it still. Could you look at this ? It's my whole mod, weapon preafab is wand_mosin. Ilya-1.9.6.rar Link to comment Share on other sites More sharing options...
IronHunter Posted September 6, 2018 Share Posted September 6, 2018 Seeing as the sound is originating from the weapon but I am not sure, if sound emitters in inventories work. Maybe try making it owner.SoundEmitter instead. Also is there any functional difference between your identical functions? I'll check it out later, when I get some spare time. Link to comment Share on other sites More sharing options...
Yakuzashi Posted September 6, 2018 Author Share Posted September 6, 2018 (edited) Thank you. If you mean onattack_gun and mosinfire functions, the first one is to play sound when bullet hits and the second one is for gunshot sound. I have used the same sound for both as an indicator in case I screwed something up. Owner instead of entity didn't work too. Edited September 6, 2018 by Yakuzashi last sentence Link to comment Share on other sites More sharing options...
IronHunter Posted September 6, 2018 Share Posted September 6, 2018 Does the sound play in your fmod designer? If you could attach your fmod folder with the sounds etc. I'll see if something is a miss there. As I can't really troubleshoot much more on the code side at this time. I'll check it out tomorrow as I am away atm. Link to comment Share on other sites More sharing options...
Yakuzashi Posted September 6, 2018 Author Share Posted September 6, 2018 Sound plays in fmod designer. Thank you for your help, I really appreciate it . sound.rar Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted September 6, 2018 Share Posted September 6, 2018 Search path is wrong, you made it to this: inst.SoundEmitter:PlaySound("mosin/mosin/gunshot/mosinfire") Link to comment Share on other sites More sharing options...
Yakuzashi Posted September 6, 2018 Author Share Posted September 6, 2018 Thank you, Gentlemen. It works now. 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