[Help] How can I make a "torch holder" puzzle?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
ChizFreak
Posts: 6
Joined: Mon Jan 14, 2013 9:18 am

[Help] How can I make a "torch holder" puzzle?

Post by ChizFreak »

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:

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
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.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [Help] How can I make a "torch holder" puzzle?

Post by Komag »

Yup, you got it figured out! But in your case you can actually do it much simpler, just link the counter directly to the door, since counters send an activate signal when they reach 0 and a deactivate signal when leaving 0 to something else (positive or negative, either way).
Finished Dungeons - complete mods to play
Post Reply