Nosidda Posted June 8, 2025 Share Posted June 8, 2025 I've added inst.SoundEmitter:PlaySound to the shields prefab and it hasn't been working. Is there a better way to do this because I'm stumped Link to comment https://forums.kleientertainment.com/forums/topic/166249-how-can-i-make-a-sound-play-when-wigfrid-parries-using-the-battle-rond/ Share on other sites More sharing options...
Haruhi Kawaii Posted June 9, 2025 Share Posted June 9, 2025 7 hours ago, Nosidda said: I've added inst.SoundEmitter:PlaySound to the shields prefab and it hasn't been working. Is there a better way to do this because I'm stumped Is your sound still working? you can use this code instead AddPrefabPostInit("wathgrithr_shield", function(inst) local oldparry = inst.components.parryweapon.onparryfn inst.components.parryweapon.onparryfn = function(inst, ...) if oldparry then oldparry(inst, ...) end inst.SoundEmitter:PlaySound("yourparrysound") end end) Link to comment https://forums.kleientertainment.com/forums/topic/166249-how-can-i-make-a-sound-play-when-wigfrid-parries-using-the-battle-rond/#findComment-1820616 Share on other sites More sharing options...
Nosidda Posted June 9, 2025 Author Share Posted June 9, 2025 15 hours ago, Haruhi Kawaii said: Is your sound still working? you can use this code instead AddPrefabPostInit("wathgrithr_shield", function(inst) local oldparry = inst.components.parryweapon.onparryfn inst.components.parryweapon.onparryfn = function(inst, ...) if oldparry then oldparry(inst, ...) end inst.SoundEmitter:PlaySound("yourparrysound") end end) The sound hasn't been working sadly. And using the code gives me this error. Messing around with the file paths makes hosting a world load forever. Checking client_log.txt it's the same error afaik Link to comment https://forums.kleientertainment.com/forums/topic/166249-how-can-i-make-a-sound-play-when-wigfrid-parries-using-the-battle-rond/#findComment-1820750 Share on other sites More sharing options...
Haruhi Kawaii Posted June 10, 2025 Share Posted June 10, 2025 15 hours ago, Nosidda said: The sound hasn't been working sadly. And using the code gives me this error. Messing around with the file paths makes hosting a world load forever. Checking client_log.txt it's the same error afaik ah... AddPrefabPostInit("wathgrithr_shield", function(inst) if not GLOBAL.TheWorld.ismastersim then return inst end local oldparry = inst.components.parryweapon.onparryfn inst.components.parryweapon.onparryfn = function(inst, ...) if oldparry then oldparry(inst, ...) end inst.SoundEmitter:PlaySound("yoursound") end end) I have attached a video on how to create sound. 2025-06-10 17-16-00.mp4 Link to comment https://forums.kleientertainment.com/forums/topic/166249-how-can-i-make-a-sound-play-when-wigfrid-parries-using-the-battle-rond/#findComment-1820888 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