how can I destroy an item on an altar?
I ve trying the code bellow, but that don't work (that's log1 code)
the altar name is "altar_11", the code is part of a script, that spawn and destroy counter, trigger floor and remove a mine_floor
Code: Select all
function newcounter()
--spawn("counter",7,10,22,0,0,"counter_7_1")
--counter_7_1.counter:setValue(1)
--counter_7_1.counter:addConnector("onActivate", "script_entity_72", "toolate")
--spawn("floor_trigger",7,17,23,0,0,"floor_trigger_7_1")
--floor_trigger_7_1.floortrigger:setTriggeredByParty(true)
--floor_trigger_7_1.floortrigger:setTriggeredByMonster(false)
--floor_trigger_7_1.floortrigger:setTriggeredByItem(false)
--floor_trigger_7_1.floortrigger:setTriggeredByDigging(false)
--floor_trigger_7_1.floortrigger:setDisableSelf(false)
--floor_trigger_7_1.floortrigger:addConnector("onActivate", "counter_7_1", "decrement")
-- if findEntity("mine_floor_01_5") ~= nil then
-- mine_floor_01_5:destroy()
-- end
if findEntity("altar_11") ~= nil then
for i in altar_11:containedItems() do
i:destroy()
end
altar_11.surface:addItem(spawn("note_relic_stolen").item)
end