Barotrauma

Barotrauma

View Stats:
locking doors
I'm playing campaign and trying to wire up door locks. I have two buttons and I want the door to be forced closed when those are on, and controllable normally with them off. can't find anything that isn't just 'edit it in the editor'
Originally posted by Beltneck:
For Doors: a 0 signal is closed, a 1 signal is open.

A device can only listen to one signal at a time, so anything that outputs a constant signal will override something that outputs intermittent signals. It will even block out other constant signals that try to come later.

Important to distinguish between Toggle_State and Set_State too, because they mean different things. Toggle takes whatever the current state of the object is, and inverts it no matter what signal is received; so to work with Toggle_State you usually need something that outputs 1/Null. Where Set_state takes whatever value you give it and forces it on the device, so you'll usually want to use 1/0 instead. Null means No Signal, and you set that by leaving a field blank.

On default settings, buttons only output a 1 signal while they're pressed, then revert to Null as soon as they're unpressed.

Switches and Levers output constant signals. So whatever they're outputting will override the button the moment it's unpressed. You'll need to set the Switch/Lever to output 0/Null, so when its in the 0 State it keeps the door shut, and when it's in it's Null state it allows other signals to control the door.

Thats why the default automatic button doors come with an AND-NOT-Delay above them. So they hold the door open for a few seconds after a button press, then revert the door to a 0 state. So if that circuit is active, your switch won't work since it will be the 2nd signal to arrive.
< >
Showing 1-3 of 3 comments
switch output is 1(or what ever is closed) and nothing you cable that to the state of the door.

a switch should be used for this not a button a button only does something when it is pressed one time for one tick. so you would need a circuit.

a button can not be "on" anyway.
Originally posted by Brother Santodes:
switch output is 1(or what ever is closed) and nothing you cable that to the state of the door.

a switch should be used for this not a button a button only does something when it is pressed one time for one tick. so you would need a circuit.

a button can not be "on" anyway.
thank you, that helps a lot
The author of this thread has indicated that this post answers the original topic.
For Doors: a 0 signal is closed, a 1 signal is open.

A device can only listen to one signal at a time, so anything that outputs a constant signal will override something that outputs intermittent signals. It will even block out other constant signals that try to come later.

Important to distinguish between Toggle_State and Set_State too, because they mean different things. Toggle takes whatever the current state of the object is, and inverts it no matter what signal is received; so to work with Toggle_State you usually need something that outputs 1/Null. Where Set_state takes whatever value you give it and forces it on the device, so you'll usually want to use 1/0 instead. Null means No Signal, and you set that by leaving a field blank.

On default settings, buttons only output a 1 signal while they're pressed, then revert to Null as soon as they're unpressed.

Switches and Levers output constant signals. So whatever they're outputting will override the button the moment it's unpressed. You'll need to set the Switch/Lever to output 0/Null, so when its in the 0 State it keeps the door shut, and when it's in it's Null state it allows other signals to control the door.

Thats why the default automatic button doors come with an AND-NOT-Delay above them. So they hold the door open for a few seconds after a button press, then revert the door to a 0 state. So if that circuit is active, your switch won't work since it will be the 2nd signal to arrive.
Last edited by Beltneck; Feb 2 @ 4:46pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Feb 2 @ 12:28pm
Posts: 3