Help destroying items
Help destroying items
I would like to make any item get destroyed when putting it in a chest. I'm new to LUA please help. I'm using the dungeon editor LUA not external.
Re: Help destroying items
If with "chest" you mean the "treasure chest", this should do it:
1) copy and paste the code below to a script entity.
2) add an "OnInsert" from the chest to the scriptentity you made, pointing to the function "destroyItem"
1) copy and paste the code below to a script entity.
2) add an "OnInsert" from the chest to the scriptentity you made, pointing to the function "destroyItem"
Code: Select all
function destroyItem(self, item)
if item then
item.go:destroy()
end
end
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?