Jump to content

a problem of earthquake


Recommended Posts

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.....

post-401598-0-22186300-1402584741_thumb.

post-401598-0-28053700-1402584742_thumb.

post-401598-0-38225800-1402584759_thumb.

Link to comment
Share on other sites

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
Share on other sites

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
Share on other sites

Just replace

 

    inst.components.SoundEmitter:PlaySound("...

 

with

 

    GetPlayer().components.SoundEmitter:PlaySound("...

 

Thank you . But it still says "SoundEmiitter is a nil value".

post-401598-0-10339600-1402652119_thumb.

post-401598-0-90601100-1402652119_thumb.

Link to comment
Share on other sites

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
Share on other sites

( ? )

Anyway

local breaking = SpawnPrefab("ground_chunks_breaking")

  breaking.components.SoundEmitter

 

 

but this will work only if the prefab has the soundemitter component

 

haha

and 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
Share on other sites

haha

and 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
Share on other sites

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".

Anyway

Thank you for your help. Finally  i solve this problem,  Thank god....

Link to comment
Share on other sites

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.

×
  • Create New...