Awesome Leki. So when the Items are put into the Alcove how do you destroy the items? Thxs for the code
EDIT: Ok I figured out how to destroy the 2 Items but the items have to have the names. (rock_3 and dagger_1) but if the names are not correct in the ID's of the item it wont work. So the code needs to destroy any rock or dagger no matter the ID. Here is my version:
Code: Select all
function surfaceContains(surface, item)
for _,i in surface:contents() do
if i.go.name == item then return true
end
end
end
function openRiddleDoor()
if surfaceContains(altar_2.surface, "rock") and
surfaceContains(altar_3.surface, "dagger") then
rock_3:destroy()
dagger_1:destroy()
dungeon_iron_gate_1.door:open()
else
dungeon_iron_gate_1.door:close()
end
end
I cant use just any old rock or dagger they have to be rock_3 and dagger_1 how can this be changed so it does not matter which rock or dagger you use? Thxs
