Please take a look at my simple script.
Posted: Sat Feb 07, 2015 8:55 am
I like so many others are trying to re-create the statue puzzle. I have done all the searches and read all the posts. I have also looked at the training videos. I am still getting an error when this script executes.
function surfaceContains(surface, item)
for v,i in surface:contents() do
if i.go.name == item then return true
end
end
end
function CastleDoor()
if surfaceContains(beach_puzzle_statue_1.surface, "rapier") then
castle_entrance_door_1.door:open()
else
castle_entrance_door_1.door:close()
end
end
Any help would be greatly appreciated. Please be kind as this is my first post.
-Tarbel
function surfaceContains(surface, item)
for v,i in surface:contents() do
if i.go.name == item then return true
end
end
end
function CastleDoor()
if surfaceContains(beach_puzzle_statue_1.surface, "rapier") then
castle_entrance_door_1.door:open()
else
castle_entrance_door_1.door:close()
end
end
Any help would be greatly appreciated. Please be kind as this is my first post.
-Tarbel