Jump to content

[help?]Removing item in world


CountNoobula

Recommended Posts

Hi all,

New here, I am currently writing a rather basic mod, but can't seem to find a full documentation no Don't Starve, I have read a lot of the tutorials though :)
Anyway, I need to find out how I can remove an existing item in the world please? Basically the opposite of spawn. Is it possible? If so, how?

Link to comment
Share on other sites

Hi all,

New here, I am currently writing a rather basic mod, but can't seem to find a full documentation no Don't Starve, I have read a lot of the tutorials though :-)

Anyway, I need to find out how I can remove an existing item in the world please? Basically the opposite of spawn. Is it possible? If so, how?

AddPrefabPostInit("prefabnamehere", function(inst)inst:Remove())

 

in modmain.lua should do it. May lead to unexpected behavior.

Link to comment
Share on other sites

I plan to do it in coding :-)

Thanks debugman18! :grin: Is there a way to get a list of all the items so I can sort through it though please? [sorry and thanks]

all the prefabs are in the files here C:\Program Files (x86)\Steam\steamapps\common\dont_starve\data\scripts\prefabs (for the steam one anyway)

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