Detect Open Doors - and close open doors

    Joined
    May 16, 2016
    Messages
    31
    Reaction score
    5
    I would love if all the doors on my ship would close after being opened. If I had a clock that ran and closed them all every 10 seconds... I'd deal with the inconvenience.

    Or maybe I'd make dedicated circuits for some.

    1) How do you detect open doors?
    2) Is there a place that explains how logic works in text - like a wiki - like for minecraft - so that the information can be updated when features change?
    This one:
    Logic Signals - StarMade Wiki

    Is not a great way to learn how to connect blocks to detect a thing and achieve an output. The youtube tutorials are great, but you can't skim them. Or edit them.
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    I would love if all the doors on my ship would close after being opened. If I had a clock that ran and closed them all every 10 seconds... I'd deal with the inconvenience.

    Or maybe I'd make dedicated circuits for some.

    1) How do you detect open doors?
    2) Is there a place that explains how logic works in text - like a wiki - like for minecraft - so that the information can be updated when features change?
    This one:
    Logic Signals - StarMade Wiki

    Is not a great way to learn how to connect blocks to detect a thing and achieve an output. The youtube tutorials are great, but you can't skim them. Or edit them.
    Sensors can now detect if a door is open or not, I've not done it myself but you can now do it.
     

    kiddan

    Cobalt-Blooded Bullet Mirror
    Joined
    May 12, 2014
    Messages
    1,131
    Reaction score
    358
    • Top Forum Contributor
    • Legacy Citizen 4
    • Purchased!
    If you slave a Door to a Sensor, the Sensor will turn an adjacent Activator on (if the Door is shut) or off (if the Door is open). The Sensor will only update its output when a logic signal is received.
     
    Last edited:
    • Like
    Reactions: Stormraven
    Joined
    May 16, 2016
    Messages
    31
    Reaction score
    5
    If you slave a Door to a Sensor, the Sensor will turn an adjacent Activator on (if the Door is shut) or off (if the Door is open). The Sensor will only update its output when a logic signal is received.
    Hahaha. OK. I tried sensors after I saw Bench had a tutorial that connected sensors and doors. But I gave up before considering the sensor might need a clock input to update.
     
    Joined
    Jun 13, 2016
    Messages
    100
    Reaction score
    9
    what's wrong with a clock?

    you can have clocks with self start circuits and also use a 'on' switch on the door
    so an on switch will only turn something on if its off and do nothing if its already on.(set/reset for electronics ppl)

    take the sensor output (activation module)for the door (this is your door on/off indicator, on being closed and off being open)
    feed into a 'not' and then into an 'and'
    feed the output of the doors flip flop(a standard button/flipflop door) into a not and then into the 'and'
    feed the output of the and into the doors flip flop

    now setup a slow clock to pulse the sensor blocks of the doors every '30 seconds' or however long (maximum) you want the doors to stay open
     

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,114
    Reaction score
    310
    Depending on how complex you want to make it....
    I use a standard circuit for my doors, and use area triggers or green rails to "block off" pressing R to open them, so people have to use the button.
    The circuit is:

    Door blocks
    ░░↑░░░░
    [NOT]
    ░░↑░░░░
    [OR]←←←←←←←←←←←←←←←←←←←←←←←←←←←
    ░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑
    [DELAY] → [DELAY] → [DELAY] → [DELAY] → [DELAY] → [DELAY]
    ░░↑░░░░
    {button}

    The button is "normally off" so the door is "normally closed" by the NOT inversion. Blocking of players ability to "press R" and manually open a door removes 95% of "door left open" problems. Adjust your delay chain to a suitable length for how long you want the door to stay open.

    If logic breaks on the server (it happens) you can still interact with the doors by really ramming your nose into them, which allows you to activate them with R (the other 5%). You're SOL if you use it to control a rail door when logic breaks though, at least until server restart. (that's done by having the [OR] activate the "opening door" rail orientation, and the [NOT] activate the "closing door" rail orientation.)

    If you're really set on having a ship wide door-reset, (I use this as a "security lock down") put another [OR] fed by the above [NOT] and a big chain of [activator]s run to every door on the ship (or just one hallway, segment by usage) that you use to "interrupt" the main door sequence.

    That would look like:

    Door blocks
    ░░↑░░░░
    [OR]←[activator]
    ░░↑░░░░
    [NOT]
    ░░↑░░░░
    [OR]←←←←←←←←←←←←←←←←←←←←←←←←←←←
    ░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑░░░░░░░░░↑
    [DELAY] → [DELAY] → [DELAY] → [DELAY] → [DELAY] → [DELAY]
    ░░↑░░░░
    {button}

    AS long as the activator is "off" the door functions normally, if it's "on(blue)" the door is "locked" closed no matter what the primary circuit is doing. you can even use that to "shut the doors" that have been opened manually with "r" by turning the activator on, then off. The functions because (last I checked) an [OR] will send a NEW "on(blue)" signal down the chain, even if it's already "on" when it receives it, but does NOT send a false if one of the input signals goes "off(orange)" while another is still "on(blue)".

    Slightly more "advanced" versions use the area triggers, or an activation gate, to open the door for you(like star trek, or your local supermarket's automated doors"). If you do this I recommend putting the area triggers or activation gate 2-3 blocks deep and away from the doors, to give logic time to start working. THis also requires a bit of fiddling with the {button} so it's set up like this:

    {button} ↔[activator] ←[area trigger control]/[Activation gate controller]

    Even if you don't use the area triggers to "block off" the door, this same circuit can be used to "trigger automatic close" a few seconds after someone trips them.

    hope it helps
     
    Last edited:

    kiddan

    Cobalt-Blooded Bullet Mirror
    Joined
    May 12, 2014
    Messages
    1,131
    Reaction score
    358
    • Top Forum Contributor
    • Legacy Citizen 4
    • Purchased!
    I recommend having individual sensors for each door. When a sensor detects a door is open, have it set-off a five sec delay before toggling the door with a flip-flop. With some extra logic you can have area detectors or activation gates reset the delay in-case more people walk through!
     
    Joined
    Feb 10, 2017
    Messages
    350
    Reaction score
    775
    • Community Content - Bronze 2
    • Legacy Citizen 5
    • Likeable


    You can use any timer for the sensors, I've just dumped in the simplest I know of. I usually use one with a longer cycle as the one in the pic is a little too fast for my liking.
    The OR block is linked to the doors.
    The activation block on the door starts the NOT and also links to the OR. The NOT is linked to the timer both above and to the right of it.
    The timer on the bottom right loops back to the timer on the top left. This fixes a timing issue that can arise if two doors are opened at the same time within the timer tick.
    Timer top right goes back to the OR on the doors.
    Simple and expandable.
     

    Attachments