Can't wrap my head around this...

    Joined
    Aug 18, 2013
    Messages
    106
    Reaction score
    36
    • Legacy Citizen 2
    • Community Content - Bronze 1
    I'm trying to build a pin protected storage container for users on my server, and I'm using this as a starting point The goal is to make it so that a public user can set and enter a code (via permission blocks), but only a faction member can reset the system.

    The problem I'm having is, I need a way to disable the program button once someone has set a code the first time. I've tried all kinds of logic to do this, but I just can't seem to get it right. I got pretty close with some logic using a Flip-Flop that turned on the first time a code was set, but it would get out of sync when I reset the code, and was also prone to failure via spamming the program button.
     

    Attachments

    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I think you are looking for an RS-gate:
    R,S...input
    R→NOT→AND←→OR←S
    The AND and the OR can both be used as ouput. The only difference between them occurs in the edge case, that both R and S are set, in which case the AND will be off, but the OR will be on.
     
    Joined
    Aug 18, 2013
    Messages
    106
    Reaction score
    36
    • Legacy Citizen 2
    • Community Content - Bronze 1
    I think you are looking for an RS-gate:
    R,S...input
    R→NOT→AND←→OR←S
    The AND and the OR can both be used as ouput. The only difference between them occurs in the edge case, that both R and S are set, in which case the AND will be off, but the OR will be on.

    That did it, Thanks!