I'm trying to make an "altar/alcove" puzzle
the puzzle is based on some notes the player finds ..
with movie trivia(I realize this might be inappropriate for the grimrock universe, I might change it)
the idea is I wrote references to different movies on the notes, then i have altars labeled with the movie titles and the player is supposed to put the movie description that matches the title on the correct altars and then a teleporter is supposed to appear.
but nothing happens.
this is the same script I used for my elemental beacons puzzle to respond to specific essences and it worked there.
unless there's some syntax error I'm missing?
or does it have to do with the notes? does the game take away the individual id's of the notes when i pick them up, turning them into generic notes with no ID?
Code: Select all
function library()
local dawn = false
local candyman = false
local childsplay = false
local nightmare = false
local sleepaway = false
local princess = false
for _,itm in altar_1.surface:contents() do
if itm.go.name == "note_dawn" then
dawn = true
break
end
end
for _,itm in altar_2.surface:contents() do
if itm.go.name == "note_candyman" then
candyman = true
break
end
end
for _,itm in altar_3.surface:contents() do
if itm.go.name == "note_childsplay" then
childsplay = true
break
end
end
for _,itm in altar_4.surface:contents() do
if itm.go.name == "note_nightmare" then
nightmare = true
break
end
end
for _,itm in altar_5.surface:contents() do
if itm.go.name == "note_sleepaway" then
sleepaway = true
break
end
end
for _,itm in altar_6.surface:contents() do
if itm.go.name == "note_princess" then
princess = true
break
end
end
if dawn and candyman and childsplay and nightmare and sleepaway and princess then
teleporter_1.controller:activate()
else
teleporter_1.controller:deactivate()
end
end