Wired Hydraulic Door

From GMod Wiki

Jump to: navigation, search

Construction

1) Place a 2x2 phx panel over a doorway in gm_construct.

2) Create a ballsocket at the top left and bottom left of the door so it can swing outwards, then close the door and freeze it in position.

3) Take out the Wired Hydraulic Tool and click once on the top right corner and again on the wall behind it and click somewhere on the inside to make the controller.

4) Next, place a Toggle Gate (under memory), an if-then-else gate, an or gate and a constant value with three values. (values 0, 1, 150).

5) Now place 2 buttons with toggle OFF on either side of the door (outside and inside) Make sure off is 0 and on is 1.

Wiring

Wire the toggle On value to the CONSTANT VALUE OF 0

Wire the Off value to the CONSTANT VALUE of 1

Wire the Clk to the OR gate.

Wire the OR gate input A to one button and B to the other button.

Now wire the if-then-else gate: input A to the toggle gate, B to constant value 150 and C to constant value 0.

Finally, wire the hydraulic controller to the if-then-else gate. The door should now open and close upon pushing either button.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox