Code: Select all
-- all torches on puzzle
function torchPuzzleLevel1()
if counter_1:getValue() == "0" then
dungeon_door_wooden_1:open()
else
dungeon_door_wooden_1:closed()
end
end
EDIT: Nevermind the problem was that I forgot to connect the counter to the script entity. Also I figured out I must put an additional increment connector from torch holder to counter when it's deactivated otherwise people can take and put the same torch 4 times on one torch holder and the door opens.