I require a bit of direction here folks...
I have 3 alcoves and 3 gems (red, green and blue) with 2 secret doors nearby. I want there to be 2 different combinations (of coloured gems in alcoves) to open the secret doors.
So far, I have set up 1 script for each alcove for 1 combination (for example):
SpoilerShow
function gemCheckRed()
local itemFound = false
for i in alcoveGemSecret1:containedItems() do
if i .name == "red_gem" then
itemFound = true
end
end
if itemFound then
gemCounter:increment()
end
end
local itemFound = false
for i in alcoveGemSecret1:containedItems() do
if i .name == "red_gem" then
itemFound = true
end
end
if itemFound then
gemCounter:increment()
end
end
The secret door wont open.
Any help would be muchly appreciated. I have never modded or scripted anything before so this learning curve has been quite steep.
Thank you!!!