I´ve tried to use the following code but without any success:
Code: Select all
for i in entitiesAt(6,6,4) and
entitiesAt(6,6,3) and
entitiesAt(6,5,4) and
entitiesAt(6,5,3) do
if i.name == "dagger" then
i:destroy()Code: Select all
for i in entitiesAt(6,6,4) and
entitiesAt(6,6,3) and
entitiesAt(6,5,4) and
entitiesAt(6,5,3) do
if i.name == "dagger" then
i:destroy()Code: Select all
for i in myalcove:containedItems() and
myalcove2:containedItems() do
if i.name == "dagger" then
i:destroy()
You would write a FOR loop that redefines the target alcove each run through the loop... Something like: alcove = findEntity(alcove_id..x)maneus wrote:Yes, Isaac. That is true. I´ve tried to use thebut this works only for one alcove and not for more.Code: Select all
for i in myalcove:containedItems() and myalcove2:containedItems() do if i.name == "dagger" then i:destroy()
And destroy an alcove destroyed only the alcove and not the item inside.
Code: Select all
for h = 1, 4 do
for i in findEntity("myalcove"..h):containedItems() do
if i.name == "dagger" then i:destroy() end
end
endCode: Select all
"myalcove"..hmaneus wrote:Thank you Isaac.

No...So a "x" instead of a number will search for all objects with the same id? Is that right?
Code: Select all
for x = 1,16 do
alcove = findEntity("dungeon_alcove_"..x)
end