Re: a little help ;)
Posted: Mon Sep 17, 2012 8:48 pm
Hmm, that's a bit trickier, and there are a few way to do it, but I'll give it a go...papazombie wrote:I wonder if you could write for 2 or more concretes items in 2 or more alcoves to open a door. For example; to open a door you have to put a dagger on the first alcove and a compass on the second alcove. I have tried to modify what you write but it doesnt work. Thanks again
Code: Select all
function daggerCheck()
for i in alcove_1:containedItems() do
if i.name == "dagger" then
compassCheck()
return
end
end
end
function compassCheck()
for i in alcove_2:containedItems() do
if i.name == "compass" then
my_door:open()
return
end
end
end
Edit: ninja'd by Magus! His uses a little bit different logic, but should work as well.