[Help] How can I make a "torch holder" puzzle?
Posted: Mon Jan 14, 2013 11:03 pm
It's not really complicated but I can't really seem to figure out by myself, I tried some things but didn't worked. Basically, I want to make a puzzle that consists of 4 torch holders, without torches, you have to place a torch in every one so a door opens. I tried to use a counter that starts at 4, then I connected all torch holders to the counter, so they "decrement", then I made a script and put this:
What I'm doing wrong? I already tested and the door never opens...
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.
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.