Please or Register to create posts and topics.

I want to set a special puzzle element.

Page 1 of 2Next

I want to to create something like this http://cs.gettysburg.edu/~tneller/resou ... index.html
The lights-out puzzle, I know how to make the lights go out in the rows...but how do i set it up to have multiple inputs to open the door.

Math_counter would work well here.

Nvm, got what you were asking wrong :P

This is a tutorial for Portal, but it should still help you with your problem. (Also you don't have to just use buttons for this.)

http://developer.valvesoftware.com/wiki/Creating_multiple_buttons_for_one_door

Let me clafiy This puzzle is a 3x3 grid all are lit expect the center light. The goal is to turn all the lights off, I only want the door to open when all the lasers are off, but each button toggles the lasers...so they turn on and off.

then as omnicoder said, use math_counter, minvalue 0 maxvalue 9 initial value 8 (number of lights turned on) and if a light is turned off substract 1, if on, add 1.
Onhitmin it opens a door, onchangefrommin closes.
9 event for each light, when that light is toggled it also toggles the neigbours with toggle (also must toggle a logic branch I guess)

-= Check out my maps: workshop, and their .vmf sources: homepage =-

I've had problems personally using a math_counter to count toggle events to activate something when they are all 'on'.

There's some kind of adding lag and if quickly toggled just one over and over it would open the door (etc.).

I decompiled one of the official maps to find they use logic_branch and logic_branch_listener, which did work better... HOWEVER... there were still instances where if you quickly toggle the events it can cause the door (etc.) to open prematurely...

Had to force a delay on the checking, i.e if its activated, if it's STILL activated after 0.5secs then open the door (etc.).

A better way would be to cancel the timer that checks the activation after 0.5s if any of the branches change.

So im sitting here...looking at the logic branch...after being away for awhile,do i setup a differnt logic branch for each...or what?

You could do it inefficiently but it would work if you put an invisible thing over each light where when you used it, it would target all the lights in those rows and toggle their states, then copy and paste it over every light and change the lights it targets to toggle.

My Maps:
[spoiler][SP] Alternate[/spoiler]

Well it should be efficent. besides i already have the puzzle working, i just dont know how to make the door open once there all off.

Page 1 of 2Next