craxue Posted June 12, 2014 Share Posted June 12, 2014 i add the item "thulecite" in variable "debris", and if i comment the condition of breaking effect . all is fine, However, if i add the breaking effect condition . The game will crash. I need help..... Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/ Share on other sites More sharing options...
Lawrence Posted June 12, 2014 Share Posted June 12, 2014 Try to put GetPlayer().SoundEmitter[...] In this way the sound will be played from the player position. Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-498896 Share on other sites More sharing options...
craxue Posted June 12, 2014 Author Share Posted June 12, 2014 Try to put GetPlayer().SoundEmitter[...] In this way the sound will be played from the player position. Could you show me an example ? i dont know where i should put this function.Thank you so much Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-498903 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 Could you show me an example ? i dont know where i should put this function.Thank you so much Just replace inst.components.SoundEmitter:PlaySound("... with GetPlayer().components.SoundEmitter:PlaySound("... Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499254 Share on other sites More sharing options...
craxue Posted June 13, 2014 Author Share Posted June 13, 2014 Just replace inst.components.SoundEmitter:PlaySound("... with GetPlayer().components.SoundEmitter:PlaySound("... Thank you . But it still says "SoundEmiitter is a nil value". Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499256 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 Thank you . But it still says "SoundEmiitter is a nil value". Ahh the joys of Lua... Can I see the entire script? Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499265 Share on other sites More sharing options...
craxue Posted June 13, 2014 Author Share Posted June 13, 2014 Ahh the joys of Lua... Can I see the entire script? do you mean the script "quaker.lua " ?quaker.zip Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499268 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 do you mean the script "quaker.lua " ? Try breaking.components.SoundEmitter (after local breaking = spawnprefab)if the ground_chunks_breaking has a sound component Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499271 Share on other sites More sharing options...
craxue Posted June 13, 2014 Author Share Posted June 13, 2014 Try breaking.components.SoundEmitter (after local breaking = spawnprefab)if the ground_chunks_breaking has a sound component OMG!!!!!!i find i just need to comment "inst.SoundEmitter:PlaySound("dontstarve/common/stone_drop")"it can work !!!!!!! How foolish i am .........But i still dont know why it will crash if i don't comment it .......And where shoud i add"breaking.components.SoundEmitter (after local breaking = spawnprefab)" ?Could you show it for me ? Thank you !!~ Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499277 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 ( ? )Anywaylocal breaking = SpawnPrefab("ground_chunks_breaking") breaking.components.SoundEmitter but this will work only if the prefab has the soundemitter component Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499278 Share on other sites More sharing options...
craxue Posted June 13, 2014 Author Share Posted June 13, 2014 ( ? )Anywaylocal breaking = SpawnPrefab("ground_chunks_breaking") breaking.components.SoundEmitter but this will work only if the prefab has the soundemitter component hahaand last question ," inst.SoundEmitter:PlaySound("dontstarve/common/stone_drop")"i dont understand what "dontstarve/common/stone_drop" means , is it just a path ? or anything else ? Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499280 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 hahaand last question ," inst.SoundEmitter:PlaySound("dontstarve/common/stone_drop")"i dont understand what "dontstarve/common/stone_drop" means , is it just a path ? or anything else ? It's a path if you go to dontstarve/data/sound there should be a TXT file, wich contains all of the sound paths used in game Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499282 Share on other sites More sharing options...
craxue Posted June 13, 2014 Author Share Posted June 13, 2014 It's a path if you go to dontstarve/data/sound there should be a TXT file, wich contains all of the sound paths used in game well, but it's weird .I can not find the folder of "common".AnywayThank you for your help. Finally i solve this problem, Thank god.... Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499290 Share on other sites More sharing options...
Lawrence Posted June 13, 2014 Share Posted June 13, 2014 well, but it's weird .I can not find the folder of "common".AnywayThank you for your help. Finally i solve this problem, Thank god.... Because the path is referred (I guess) to packed files Link to comment https://forums.kleientertainment.com/forums/topic/37382-a-problem-of-earthquake/#findComment-499291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.